/*
 * ── ap- 系 商品紹介ガイド 共通CSS ──────────────
 * 使い方ガイド・選び方・特集など「常設」ページで共通利用する。
 * 期間限定の企画LPは lp-common.css を使うこと（系統が違う）。
 *
 * 仕様：app/template/user_data/_design-guide.md
 * 実装例：app/template/user_data/painting.twig
 *
 * ページ固有のコンポーネントはこのファイルに入れず、
 * assets/css/<ページ名>.css に分ける。
 */

/* ─── トークン ─────────────────────────────── */
:root {
  --ap-red:      #D71E0E;
  --ap-red-dark: #A8160A;
  --ap-dark:     #1C1B19;
  --ap-mid:      #5A5650;
  --ap-line:     #D4CFC8;
  --ap-bg:       #F4F1EC;
  --ap-surface:  #FFFFFF;
  --ap-amber:    #E8920A;
  --ap-amber-bg: #FEF6E4;
  --ap-plus:     #4A7090;
  --ap-plus-bg:  #EBF3F8;
  --ap-gun:      #5A7A2E;
  --ap-gun-bg:   #EBF2E0;
}

/* ─── ページ基盤 ───────────────────────────── */
.ap-page {
  background: var(--ap-bg);
  font-family: -apple-system, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  color: var(--ap-dark);
  padding-bottom: 40px;
}

/* ─── ヒーロー ──────────────────────────────  */
.ap-hero {
  background: var(--ap-red);
  color: #fff;
  padding: 32px 20px 28px;
  position: relative;
  overflow: hidden;
}
.ap-hero__stripe {
  position: absolute;
  top: -40px; right: -30px;
  width: 160px; height: 220px;
  background: rgba(255,255,255,0.06);
  transform: rotate(20deg);
}
.ap-hero__stripe::after {
  content: '';
  position: absolute;
  top: 0; left: 40px;
  width: 60px; height: 100%;
  background: rgba(255,255,255,0.04);
}
.ap-hero__inner { position: relative; }
.ap-hero__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin: 0 0 8px;
}
.ap-hero__title {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.ap-hero__desc {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  margin: 0 0 20px;
}
.ap-hero__meta {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ap-hero__meta-item { text-align: center; }
.ap-hero__meta-num {
  display: block;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}
.ap-hero__meta-label {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}
.ap-hero__meta-div {
  width: 1px; height: 32px;
  background: rgba(255,255,255,0.3);
}

/* ─── セクション共通 ────────────────────────── */
.ap-section {
  margin: 0;
  padding: 24px 16px;
  border-bottom: 1px solid var(--ap-line);
}
.ap-section-head {
  margin-bottom: 16px;
}
.ap-section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ap-dark);
  margin: 0 0 4px;
}
.ap-section-sub {
  font-size: 12px;
  color: var(--ap-mid);
  margin: 0;
}

/* ─── 買い物チェックリスト ───────────────────── */
.ap-section--checklist { background: var(--ap-surface); }
.ap-checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ap-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--ap-line);
  border-radius: 6px;
  cursor: pointer;
  background: var(--ap-bg);
  transition: background 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.ap-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--ap-red);
  flex-shrink: 0;
  cursor: pointer;
}
.ap-check__text {
  font-size: 12px;
  font-weight: 600;
  color: var(--ap-dark);
  flex: 1;
  line-height: 1.3;
}
.ap-check__cat {
  font-size: 10px;
  color: var(--ap-mid);
  white-space: nowrap;
}
.ap-check:has(input:checked) {
  opacity: 0.45;
  background: #e8e4de;
}
.ap-check:has(input:checked) .ap-check__text {
  text-decoration: line-through;
}

/* ─── STEPセクション ─────────────────────────── */
.ap-step {
  background: var(--ap-surface);
  position: relative;
}
.ap-step__rail {
  position: absolute;
  left: 30px; top: 64px; bottom: 0;
  width: 2px;
  background: var(--ap-line);
  display: none;   /* SPは本文を全幅で使うためレールを出さない */
}
.ap-step--last .ap-step__rail { display: none; }
.ap-step__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  position: relative;
}
.ap-step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: var(--ap-red);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.ap-step__titles { padding-top: 4px; }
.ap-step__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ap-red);
  text-transform: uppercase;
  margin: 0 0 2px;
}
.ap-step__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ap-dark);
  margin: 0;
  text-wrap: balance;
}
.ap-step__body { padding-left: 0; }
.ap-body-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ap-mid);
  margin: 0 0 16px;
}

/* ─── サブタイトル ─────────────────────────────  */
.ap-sub-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ap-dark);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--ap-line);
  position: relative;
}
.ap-sub-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 48px; height: 2px;
  background: var(--ap-red);
}

/* ─── ティップボックス ──────────────────────── */
.ap-tip {
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.ap-tip--info {
  background: #EEF4FB;
  border-left: 3px solid #4A90D9;
}
.ap-tip--warn {
  background: var(--ap-amber-bg);
  border-left: 3px solid var(--ap-amber);
}
.ap-tip__head {
  font-size: 13px;
  font-weight: 700;
  color: var(--ap-dark);
  margin: 0 0 4px;
}
.ap-tip__text {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ap-mid);
  margin: 0;
}
.ap-tip__img {
  width: 100%;
  max-width: 600px;
  display: block;
  margin: 10px auto 0;
  border-radius: 4px;
}

/* ─── タブ（メーカー選択） ──────────────────── */
/* クルマ・バイクを束ねる外側の箱。切り替えは自前のJSで行う（Bootstrapのタブは使わない）*/
.ap-tabs {
  display: flex;
  flex-wrap: wrap !important;
  gap: 4px;
  border: none !important;
  margin-bottom: 4px;
}
.ap-tab {
  border: 1px solid var(--ap-line);
  border-radius: 4px;
  font-size: 12px;
  padding: 6px 12px;
  color: var(--ap-dark);
  background: var(--ap-bg);
  cursor: pointer;
  margin: 0;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}
.ap-tab:hover { border-color: var(--ap-red); color: var(--ap-red); }
.ap-tab.active {
  background: var(--ap-red);
  border-color: var(--ap-red);
  color: #fff;
}
.ap-tab:focus-visible {
  outline: 2px solid var(--ap-red);
  outline-offset: 2px;
}
.ap-tab-content { margin-top: 8px; }
.ap-pane { display: none; }
.ap-pane.active {
  display: block;
  animation: apFadeIn 0.3s ease forwards;
}
.ap-size-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 0;
}
.ap-size-btn {
  display: block;
  text-align: center;
  padding: 10px 4px;
  border: 1px solid var(--ap-line);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ap-red);
  background: var(--ap-surface);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.ap-size-btn:hover, .ap-size-btn:focus {
  background: var(--ap-red);
  color: #fff;
  border-color: var(--ap-red);
}

/* ─── コース選択（缶 or ガン） ───────────────── */
.ap-choice {
  border: 1px solid var(--ap-line);
  border-left: 4px solid var(--ap-plus);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 12px;
  background: var(--ap-plus-bg);
}
.ap-choice--gun {
  border-left-color: var(--ap-gun);
  background: var(--ap-gun-bg);
}
.ap-choice__head {
  margin-bottom: 12px;
  overflow: hidden;   /* SPで回り込ませたイラストを内包する */
}
.ap-choice__img {
  display: block;
  /* SPはバッジ・見出しの右に回り込ませる */
  float: right;
  width: 40%;
  max-width: 150px;
  height: auto;
  margin: 0 0 6px 12px;
}
.ap-choice__text { min-width: 0; }
.ap-choice__badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #fff;
  background: var(--ap-plus);
  padding: 2px 8px;
  border-radius: 3px;
}
.ap-choice--gun .ap-choice__badge { background: var(--ap-gun); }
.ap-choice__name {
  font-size: 16px;
  font-weight: 800;
  color: var(--ap-dark);
  margin: 6px 0 4px;
}
.ap-choice__lead {
  font-size: 12px;
  line-height: 1.7;
  color: var(--ap-mid);
  margin: 0 0 8px;
}
.ap-choice__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ap-choice__spec {
  font-size: 10px;
  font-weight: 600;
  color: var(--ap-mid);
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--ap-line);
  padding: 2px 6px;
  border-radius: 3px;
}

/* ─── セット商品カード ───────────────────────── */
.ap-set-card {
  display: flex;
  align-items: stretch;
  background: var(--ap-gun-bg);
  border: 1px solid var(--ap-gun);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ap-dark);
  transition: box-shadow 0.15s;
}
.ap-set-card:hover {
  box-shadow: 0 2px 10px rgba(90,122,46,0.2);
  text-decoration: none;
}
.ap-set-card:focus-visible {
  outline: 2px solid var(--ap-gun);
  outline-offset: 2px;
}
.ap-set-card__img {
  width: 96px;
  object-fit: contain;
  background: var(--ap-surface);
  flex-shrink: 0;
  display: block;
}
.ap-set-card__body {
  padding: 10px 12px;
  flex: 1;
  min-width: 0;
}
.ap-set-card__eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ap-gun);
  margin: 0 0 2px;
}
.ap-set-card__name {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 4px;
}
.ap-set-card__desc {
  font-size: 11px;
  line-height: 1.6;
  color: var(--ap-mid);
  margin: 0 0 6px;
}
.ap-set-card__btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--ap-gun);
}

/* ─── 注意事項 ───────────────────────────── */
.ap-notes {
  background: var(--ap-bg);
  border-bottom: none;
}
.ap-notes__title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ap-dark);
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 4px solid var(--ap-amber);
}
.ap-notes__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.ap-note {
  background: var(--ap-surface);
  border: 1px solid var(--ap-line);
  border-radius: 6px;
  padding: 12px 14px;
}
.ap-note__head {
  font-size: 12px;
  font-weight: 800;
  color: var(--ap-amber);
  margin: 0 0 4px;
}
.ap-note__text {
  font-size: 11px;
  line-height: 1.7;
  color: var(--ap-mid);
  margin: 0;
}
.ap-notes__disclaimer,
.ap-notes__contact {
  font-size: 11px;
  line-height: 1.7;
  color: var(--ap-mid);
  margin: 12px 0 0;
}
.ap-notes__contact {
  padding-top: 10px;
  border-top: 1px solid var(--ap-line);
}

/* ─── 関連記事 ───────────────────────────── */
.ap-related {
  background: var(--ap-surface);
  border-bottom: none;
}
.ap-article-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.ap-article {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--ap-bg);
  border: 1px solid var(--ap-line);
  border-radius: 8px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--ap-dark);
  transition: box-shadow 0.15s;
}
.ap-article:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); text-decoration: none; }
.ap-article:focus-visible {
  outline: 2px solid var(--ap-red);
  outline-offset: 2px;
}
.ap-article__label {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ap-red);
  border: 1px solid var(--ap-red);
  border-radius: 3px;
  padding: 1px 6px;
}
.ap-article__title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--ap-dark);
  margin: 0;
}
.ap-article__desc {
  font-size: 11px;
  line-height: 1.6;
  color: var(--ap-mid);
  margin: 0;
  flex: 1;
}
.ap-article__btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--ap-red);
}

/* ─── 折りたたみ（もっと見る） ───────────────── */
.ap-collapse {
  position: relative;
  margin-top: 8px;
}
.ap-collapse__input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.ap-collapse__inner {
  position: relative;
  overflow: hidden;
  /* 畳んだときの高さは修飾子側で指定する（例: .ap-collapse--volume）*/
}
.ap-collapse__inner > * { margin-top: 0; }
.ap-collapse__inner::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 72px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, var(--ap-surface) 90%);
  pointer-events: none;
}
.ap-collapse:has(.ap-collapse__input:checked) .ap-collapse__inner {
  aspect-ratio: auto;
}
.ap-collapse:has(.ap-collapse__input:checked) .ap-collapse__inner::after {
  display: none;
}
.ap-collapse__toggle {
  display: block;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px dashed var(--ap-line);
  border-radius: 8px;
  color: var(--ap-mid);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}
.ap-collapse__toggle::after { content: 'もっと見る ▼'; }
.ap-collapse:has(.ap-collapse__input:checked) .ap-collapse__toggle::after { content: '閉じる ▲'; }
.ap-collapse__toggle:hover {
  border-color: var(--ap-red);
  color: var(--ap-red);
}
.ap-collapse:has(.ap-collapse__input:focus-visible) .ap-collapse__toggle {
  outline: 2px solid var(--ap-red);
  outline-offset: 2px;
}

/* メーカータブ用：1行に収まる分だけ見せて、残りは「もっと見る」 */
.ap-collapse--tabs .ap-collapse__inner { aspect-ratio: auto; }
.ap-collapse--tabs .ap-tabs {
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
}
.ap-collapse--tabs:has(.ap-collapse__input:checked) .ap-tabs { flex-wrap: wrap !important; }
.ap-collapse--tabs .ap-collapse__inner::after {
  top: 0; bottom: 0; left: auto; right: 0;
  width: 56px; height: auto;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, var(--ap-surface) 85%);
}
.ap-collapse--tabs .ap-collapse__toggle::after { content: 'すべてのメーカーを見る ▼'; }

/* 埋め込み（iframe）を畳む。高さとボタン文言は修飾子側（ページ固有css）で指定する */
.ap-collapse--iframe .ap-collapse__inner {
  border: 1px solid var(--ap-line);
  border-radius: 8px;
  background: var(--ap-surface);
}
.ap-collapse--iframe .ap-collapse__inner iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ─── ステップのインデント打ち消し ──────────────
   PCのステップ本文には左に58pxのインデントがある。横に広い表や埋め込みは
   これを打ち消して幅を稼ぐ。ただし打ち消せるのは 34px まで。
   - 縦のレール（.ap-step__rail）が left:30px にあるので、そこへ被せない
   - セクションの左右パディング（16px）を消すとページ端を突き抜ける */
.ap-bleed { margin-left: 0; }
@media (min-width: 576px) {
  .ap-step__body .ap-bleed { margin-left: -34px; }
}

/* ─── アイテムリスト（横長カード） ─────────── */
.ap-item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ap-item {
  display: flex;
  align-items: stretch;
  background: var(--ap-bg);
  border: 1px solid var(--ap-line);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ap-dark);
  transition: box-shadow 0.15s;
}
.ap-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.ap-item__accent {
  width: 4px;
  background: var(--ap-red);
  flex-shrink: 0;
}
.ap-item--plus .ap-item__accent { background: var(--ap-plus); }
.ap-item--safety .ap-item__accent { background: var(--ap-amber); }
/* 未登録商品のプレースホルダー（商品登録後は <a class="ap-item"> に戻す） */
.ap-item--soon {
  border-style: dashed;
  background: transparent;
  cursor: default;
}
.ap-item--soon .ap-item__accent { background: var(--ap-line); }
.ap-item--soon .ap-item__img {
  opacity: .45;
  background: var(--ap-bg);
  object-fit: contain;
}
.ap-item--soon .ap-item__name { color: var(--ap-mid); }
.ap-gun-badge, .ap-can-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: middle;
  white-space: nowrap;
}
.ap-gun-badge { background: var(--ap-gun-bg); color: var(--ap-gun); }
/* カード内に単独で置くとき（商品名と同じ行に入れると幅を押し広げるため） */
.ap-gun-badge--block {
  align-self: flex-start;
  margin-left: 0;
  margin-bottom: 5px;
}
.ap-can-badge { background: var(--ap-plus-bg); color: var(--ap-plus); }
.ap-item__img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.ap-item__body {
  padding: 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.ap-item__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ap-dark);
  margin: 0 0 3px;
}
.ap-item__desc {
  font-size: 11px;
  color: var(--ap-mid);
  line-height: 1.5;
  margin: 0 0 6px;
}
.ap-item__btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--ap-red);
  text-decoration: none;
}

/* ─── もっと見るリンク ── */
.ap-more {
  display: block;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px dashed var(--ap-line);
  border-radius: 8px;
  background: transparent;
  color: var(--ap-mid);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.ap-more:hover {
  border-color: var(--ap-red);
  color: var(--ap-red);
  text-decoration: none;
}

/* ─── フィーチャーカード（コンプレッサー等） ── */
.ap-spec {
  font-size: 10px;
  background: #FDECEA;
  color: var(--ap-red-dark);
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
}

/* ─── ツールグリッド（小物道具） ────────────── */
.ap-tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ap-tool {
  display: flex;
  flex-direction: column;
  background: var(--ap-bg);
  border: 1px solid var(--ap-line);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ap-dark);
  transition: box-shadow 0.15s;
}
.ap-tool:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.ap-tool__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.ap-tool__body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.ap-tool__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ap-dark);
  margin: 0 0 3px;
  line-height: 1.3;
}
/* 未登録商品のプレースホルダー（商品登録後は <a class="ap-tool"> に戻す） */
.ap-tool--soon {
  border-style: dashed;
  background: transparent;
  cursor: default;
}
.ap-tool--soon .ap-tool__img {
  opacity: .45;
  background: var(--ap-bg);
  object-fit: contain;
}
.ap-tool--soon .ap-tool__name { color: var(--ap-mid); }
.ap-soon-badge {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ap-mid);
  background: var(--ap-bg);
  border: 1px solid var(--ap-line);
  padding: 2px 7px;
  border-radius: 3px;
  margin-bottom: 5px;
}
.ap-tool__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 5px;
}
.ap-tool__desc {
  font-size: 11px;
  color: var(--ap-mid);
  line-height: 1.5;
  margin: 0 0 6px;
  flex: 1;
}
.ap-tool__btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--ap-red);
}

/* ─── PLUSセクション ─────────────────────────── */
.ap-plus {
  background: var(--ap-plus-bg);
}
.ap-plus .ap-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ap-plus__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: var(--ap-plus);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  border-radius: 50%;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}
.ap-plus__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--ap-dark);
  margin: 0 0 2px;
}

/* ─── タブレット以上 ─────────────────────────── */
@media (min-width: 576px) {
  .ap-hero__title { font-size: 42px; }
  .ap-choice__head {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .ap-choice__text { flex: 1; }
  .ap-choice__img {
    order: 2;
    float: none;
    width: 200px;
    max-width: none;
    flex-shrink: 0;
    margin: 0;
  }
  /* PCはステップ番号に本文を揃え、縦のレールでつなぐ */
  .ap-step__body { padding-left: 58px; }
  .ap-step__rail { display: block; }
  .ap-step--last .ap-step__rail { display: none; }
  .ap-tool-grid { grid-template-columns: repeat(3, 1fr); }
  .ap-article-list { grid-template-columns: repeat(3, 1fr); }
  .ap-notes__grid { grid-template-columns: repeat(2, 1fr); }
  .ap-item__img { width: 100px; height: 100px; }
  .ap-sp-br { display: none; }
}

/* ─── タブアニメーション ─────────────────────── */
@keyframes apFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── フォーカス・アクセシビリティ ─────────── */
.ap-item:focus-visible,
.ap-tool:focus-visible,
.ap-size-btn:focus-visible {
  outline: 2px solid var(--ap-red);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .ap-pane.active { animation: none; }
  .ap-item, .ap-tool, .ap-size-btn { transition: none; }
}


/* ─── 表 ───────────────────────────────────────
   罫線は横だけ。囲まないほうが本文となじむ。
   2列の「項目 → 値」は .ap-table--kv、
   横に長い比較表は .ap-table-wrap--scroll で包む。 */
.ap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 8px;
}
.ap-table thead th {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ap-mid);
  text-align: left;
  padding: 0 12px 6px;
  border-bottom: 2px solid var(--ap-dark);
  white-space: nowrap;
}
.ap-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--ap-line);
  color: var(--ap-dark);
  vertical-align: top;
}
.ap-table tbody tr:last-child td { border-bottom: none; }
.ap-table td:first-child {
  font-weight: 700;
  white-space: nowrap;
}
.ap-table__note {
  font-size: 11px;
  line-height: 1.6;
  color: var(--ap-mid);
  margin: 0 0 16px;
  padding-left: 1em;
  text-indent: -1em;
}

/* 項目 → 値の2列。値は右寄せで数字をそろえる */
.ap-table--kv thead th:last-child,
.ap-table--kv td:last-child {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ap-table--kv td:first-child { font-weight: 500; }

/* 横に長い比較表。表だけが内側でスクロールし、1列目は固定する */
.ap-table-wrap--scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 8px;
}
.ap-table-wrap--scroll .ap-table { margin: 0; }
.ap-table-wrap--scroll .ap-table td { white-space: nowrap; }
.ap-table-wrap--scroll .ap-table th:first-child,
.ap-table-wrap--scroll .ap-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--ap-surface);
  box-shadow: 1px 0 0 var(--ap-line);
}

/* ─── キービジュアル ─────────────────────────
   ヒーロー直下に置く全幅の画像。 */
.ap-kv {
  display: block;
  width: 100%;
  height: auto;
}
