/* ========================================
   目次
   ========================================
   1. 基本設定（テキスト・見出し）
   2. 施設外部リンク
   3. 関連記事カード
   4. アフィリエイト・CTAボタン
   5. ノート・チェックリスト
   6. FAQ
   7. 画像・キャプション
   8. テーブル（Moshimo対応・完全版）
   9. その他ユーティリティ
   10.アプリーチ用CSS（アプリ紹介）
   11.筆者コメント用CSS
   12.スマート追従ボタンのデザイン
   13.診断チャート（sagasu.life Ver.）
   14. アフィリエイトラッパー・キャッチコピー）
   15. 画像イメージ注記
   ======================================== */


/* ========================================
   1. 基本設定（テキスト・見出し）
   ======================================== */

/* strongタグの太文字を少し大きく */
strong {
  font-weight: 600;
  font-size: 102%;
}

/* h2見出し（章タイトル） */
h2 {
  font-size: 1.2rem !important;
  color: #ffffff !important;
  background-color: #56899d !important;
  padding: 0.75em 1em !important;
  border-left: 6px solid #4a6c8a !important;
  border-radius: 2px;
  margin: 2em 0 1em !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

/* h3見出し（小見出し） */
h3 {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: #2c3e50 !important;
  background: #f5faff !important;
  border-left: 2px solid #91c8f4 !important;
  padding: 0.5em 1em !important;
  margin: 1.5em 0 1em !important;
}

@media (max-width: 768px) {
  h3 {
    line-height: 1.3 !important;
  }
}

/* h4見出し */
h4 {
  font-size: 1rem !important;
  font-weight: bold !important;
  padding: 0.3em 0 !important;
  border-bottom: 1px solid #ddd !important;
  color: #333 !important;
  margin: 1.5em 0 1em !important;
  line-height: 1.4em !important;
}

/* リストスタイル */
.elementor-text-editor ul {
  font-size: 101%;
  font-weight: 500;
  padding-left: 1.8em;
  margin-left: 0;
  padding-top: 20px;
  padding-bottom: 20px;
}

/* JetEngineリスト内のパディング調整 */
.jet-listing-dynamic-field__content ul {
  padding-left: 22px;
}

/* Elementorテキストウィジェットの余白調整 */
.elementor-widget-text-editor {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 長いURLの折り返し */
.elementor a {
  word-break: break-word;
  overflow-wrap: break-word;
}


/* ========================================
   2. 施設外部リンク
   ======================================== */

.facility-link a {
  display: inline-flex;
  align-items: center;
  color: #333;
  text-decoration: none;
  font-weight: 600;
}

.facility-link a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* 左側の丸矢印アイコン */
.facility-link a::before {
  content: '›';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background-color: #4A8F58;
  color: #fff;
  font-weight: bold;
  width: 1.5em;
  height: 1.5em;
  border-radius: 50%;
  margin-right: 0.5em;
}


/* ========================================
   3. 関連記事カード
   ======================================== */

.related-articles {
  margin: 10px 0; /* スマホは10px */
  clear: both;
}

.related-article-card {
  position: relative;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ddd;
  background: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.related-article-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: #498F58;
}

/* 関連記事バッジ */
.related-article-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: #498F58;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 5px 10px;
  z-index: 10;
  line-height: 1.4;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* カード全体リンク（横並びレイアウト） */
.related-article-link {
  display: flex;
  align-items: stretch;
  text-decoration: none;
  color: #333;
  background-color: #fff;
  transition: background-color 0.2s ease;
}

.related-article-link:hover {
  background-color: #f9f9f9;
  text-decoration: none;
}

/* 画像部分 */
.related-article-image {
  flex-shrink: 0;
  width: 120px;
  aspect-ratio: 5 / 4;
  background: #f5f5f5;
  overflow: hidden;
}

.related-article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-article-card:hover .related-article-image img {
  transform: scale(1.05);
}

/* テキスト部分 */
.related-article-content {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 記事タイトル（h3リセット対応） */
.related-article-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  color: #333 !important;
  margin: 0 0 6px 0 !important;
  padding: 0 0 6px 0 !important;
  text-align: left !important;
  border-bottom: 2px solid #e0e0e0 !important;
  border-left: none !important;
  background: none !important;
  display: block !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
  overflow: visible !important;
  transition: color 0.2s ease;
}

.related-article-link:hover .related-article-title {
  color: #498F58 !important;
}

/* 記事の抜粋 */
.related-article-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.6;
  color: #666;
  margin: 0;
}

/* 記事末尾の関連記事まとめセクション */
.related-summary {
  margin: 50px 0 30px 0;
  padding: 0;
  background: none;
  border-radius: 0;
  border: none;
}

/* 関連記事を通常のカードと同じデザインで表示 */
.related-articles-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.related-articles-grid .related-article-card {
  margin: 0 0 16px 0;
}

/* 最後のカードだけmargin-bottomを削除 */
.related-articles-grid .related-article-card:last-child {
  margin-bottom: 0;
}

/* タブレット表示（480px-767px） */
@media (min-width: 480px) and (max-width: 767px) {
  .related-articles {
    margin: 16px 0; /* タブレットは16px */
  }

  .related-article-card {
    margin-bottom: 14px;
  }

  .related-articles-grid .related-article-card {
    margin: 0 0 14px 0;
  }

  .related-article-image {
    width: 140px;
  }

  .related-article-content {
    padding: 14px 16px;
  }

  .related-article-title {
    font-size: 14px !important;
  }

  .related-article-excerpt {
    font-size: 12px;
  }
}

/* PC表示（768px以上） */
@media (min-width: 768px) {
  .related-articles {
    margin: 20px 0; /* PCは20px */
  }

  .related-article-card {
    margin-bottom: 18px;
  }

  .related-articles-grid .related-article-card {
    margin: 0 0 18px 0;
  }

  .related-article-image {
    width: 180px;
  }

  .related-article-content {
    padding: 16px 20px;
  }

  .related-article-title {
    font-size: 16px !important;
    margin-bottom: 8px !important;
    padding-bottom: 8px !important;
  }

  .related-article-excerpt {
    -webkit-line-clamp: 3;
    font-size: 14px;
    line-height: 1.7;
    color: #555;
  }

  .related-summary {
    margin: 60px 0 40px 0;
  }
}

/* 既存のarticle要素との調整 */
article .related-article-card {
  box-sizing: border-box;
}

article .related-article-link * {
  box-sizing: border-box;
}

/* スマホでの横スクロール防止 */
.related-articles,
.related-summary {
  max-width: 100%;
  overflow: hidden;
}



/* ========================================
   4. アフィリエイト・CTAボタン（初期化・復旧版）
   ======================================== */

/* --- 共通設定 --- */
.affiliate-box-title {
  margin: 0 0 10px 0;
  font-weight: 600;
  color: #444;
  font-size: 1.1em;
  line-height: 1.4;
}

/* --- 旧式アフィリエイトボックス --- */
.affiliate-box {
  max-width: 500px;
  margin: 25px auto;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: box-shadow 0.3s ease;
}

/* --- 新式：アフィリエイトボックスMini --- */
.moshimo-affiliate-box-mini {
  display: flex;
  gap: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin: 2em 0;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  align-items: center;
  text-align: left;
  
  /* ラベル用設定 */
  position: relative;
  overflow: hidden;
  border-top: 3px solid #d32f2f; /* 上辺アクセント（赤） */
}

/* 画像エリア */
.moshimo-affiliate-box-mini .affiliate-box-image {
  flex: 0 0 100px;
  text-align: center;
}
.moshimo-affiliate-box-mini .affiliate-box-image img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* コンテンツエリア */
.affiliate-box-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* マイクロコピー */
.affiliate-box-microcopy {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 10px;
  background: #f9f9f9;
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 3px solid #ff9900;
}

/* ラベル本体（赤） */
.affiliate-box-label {
  position: absolute;
  top: 0;
  left: 0;
  background-color: #d32f2f;
  color: #fff;
  font-size: 0.75em;
  font-weight: bold;
  padding: 4px 12px;
  border-bottom-right-radius: 8px;
  z-index: 10;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
  line-height: 1.2;
}

/* --- ボタンエリア --- */
.affiliate-buttons,           /* 旧式用 */
.affiliate-box-buttons {      /* 新式用 */
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.affiliate-buttons {
  justify-content: center; /* 旧式のみ中央寄せ */
}

/* --- ボタンデザイン（共通） --- */
.aff-button,                  /* 旧式クラス */
.affiliate-btn a {            /* 新式クラス */
  display: inline-block;
  padding: 8px 16px;
  color: #fff !important;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.9em;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: opacity 0.2s, transform 0.2s;
  background-color: #555;
}

.aff-button:hover,
.affiliate-btn a:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}

/* --- ブランド別カラー --- */
/* Amazon (オレンジ) */
.aff-button-amazon,
.affiliate-btn-amazon a {
  background: #ff9900 !important;
}

/* 楽天 (赤) */
.aff-button-rakuten,
.affiliate-btn-rakuten a {
  background: #bf0000 !important;
}

/* トラッキング画像非表示 */
.affiliate-buttons img[width="1"],
.affiliate-box-buttons img[width="1"],
.affiliate-box-image img[width="1"] {
  display: none;
}

/* --- CTAボタン（その他リンク） --- */
.cta { display: inline-block; margin: 0.3em 0.4em 0.3em 0; }
.cta a {
  display: inline-block;
  color: #fff;
  font-weight: 600;
  padding: 0.6em 1.4em;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s ease;
  line-height: 1.4;
}
.cta.rakuten a, .cta.rakuten-travel a { background-color: #bf0000; }
.cta.amazon a { background-color: #232f3e; }
.cta.yahoo a { background-color: #F46300; }
.cta:not(.rakuten):not(.amazon):not(.yahoo) a { background-color: #2e7d32; }

/* --- スマホ対応 --- */
@media (max-width: 600px) {
  .moshimo-affiliate-box-mini {
    flex-direction: column;
    text-align: left;
    padding-top: 35px;
  }
  .moshimo-affiliate-box-mini .affiliate-box-image {
    width: 120px;
    margin: 0 auto 10px;
  }
  .affiliate-box-buttons {
    width: 100%;
  }
  .affiliate-btn {
    flex: 1;
    text-align: center;
  }
  .affiliate-btn a {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
}

/* ========================================
   5. ノート・チェックリスト
   ======================================== */

/* sagasuグリーン：文字サイズUP・位置調整版 */
.note {
  position: relative;
  background-color: #f4f9f4; /* 薄いグリーン */
  border: 1px solid #dcecdb; /* 薄い緑の枠線 */
  padding: 20px 15px 15px;   /* 内側の余白 */
  border-radius: 4px;
  margin: 25px 0;            /* 外側の余白 */
  color: #555;
  font-size: 0.95em;
}

/* "POINT" 文字部分 */
.note::before {
  content: "POINT";
  position: absolute;
  
  /* ▼ ここを調整：位置を少し下げる（枠線との重なりを増やす） */
  top: -7px;                 
  
  left: 15px;
  background-color: #f4f9f4; /* 本体の背景色と同じ */
  color: #388e3c;            /* ロゴのグリーン */
  
  /* ▼ ここを調整：文字サイズを大きく */
  font-size: 14px;           
  
  font-weight: bold;
  padding: 0 6px;            /* 文字左右の余白 */
  line-height: 1;
}

/* チェックリスト（共通設定） */
.checklist {
  --cl-accent: #0ea5e9;
}

ul.checklist,
.checklist > ul {
  list-style: none;
  margin: 0 0 24px 0;
  padding: 0;
}

ul.checklist > li,
.checklist > ul > li {
  position: relative;
  padding: 12px 12px 12px 44px;
}

ul.checklist > li:last-child,
.checklist > ul > li:last-child {
  margin-bottom: 0;
}

/* チェックアイコン（ボックス） */
ul.checklist > li::before,
.checklist > ul > li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 3px;
  background: var(--cl-accent);
}

/* チェックマーク（✓） */
ul.checklist > li::after,
.checklist > ul > li::after {
  content: "\2713";
  position: absolute;
  left: 19px;
  top: 50%;
  transform: translateY(-56%);
  font-size: 14px;
  line-height: 1;
  color: #fff;
  font-weight: 700;
}

/* カスタムチェックリスト（SVG版） */
.custom-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.custom-checklist li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
}

.custom-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  background: url('https://sagasu.life/wp-content/uploads/check_circle.svg') no-repeat center center;
  background-size: contain;
}


/* ========================================
   6. FAQ
   ======================================== */

.faq {
  margin: 2rem 0;
}

.faqItem {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0rem 1.25rem 1.35rem;
  margin: 1rem 0;
  background: #fff;
}

.faqQ {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 .5rem;
  display: flex;
  gap: .5rem;
  align-items: flex-start;
}

.faqQ::before {
  content: "Q.";
  font-weight: 700;
}

.faqA {
  margin: 0;
}

.faqA p {
  margin: 0;
  line-height: 1.9;
}

.faqA + .faqQ {
  margin-top: 1rem;
}

.faqA ul,
.faqA ol {
  margin: .5rem 0 0 1.25rem;
}


/* ========================================
   7. 画像・キャプション
   ======================================== */

/* Elementor投稿本文内の基本画像スタイル */
.elementor-widget-theme-post-content .elementor-widget-container img {
  height: auto;
  width: auto;
  object-fit: contain;
}

/* WordPress標準の画像配置（画像単体） */
img.alignleft {
  float: left;
  margin: 0 1.5em 1em 0;
}

img.alignright {
  float: right;
  margin: 0 0 1em 1.5em;
}

img.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* wp-caption（画像＋キャプション）基本設定 */
.wp-caption.alignnone,
.wp-caption.alignleft,
.wp-caption.alignright,
.wp-caption.aligncenter {
  width: 100% !important;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-align: left;
}

.wp-caption img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.wp-caption .wp-caption-text {
  font-size: 0.8em;
  color: #151515;
  text-align: center;
  margin-top: 0.5em;
  margin-bottom: 1.5em;
}

/* PC表示時の画像配置調整 */
@media (min-width: 768px) {
  .wp-caption.alignnone {
    max-width: 50%;
    margin-left: 0;
    margin-right: auto;
  }

  .wp-caption.alignleft {
    max-width: 50%;
    float: none;
    margin-left: 0;
    margin-right: auto;
  }

  .wp-caption.alignright {
    max-width: 50%;
    float: none;
    margin-left: auto;
    margin-right: 0;
  }
}

/* Genspark/Skywork用の記事画像 */
.article-image {
  display: block;
  width: 100%;
  max-width: 600px !important;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 20px auto 6px;
}

.image-caption {
  font-size: 13px;
  color: #666;
  text-align: center;
  margin-top: 2px;
  margin-bottom: 24px;
  font-style: italic;
}

/* ========================================
   アフィリエイト画像（サイズ調整 ＋ 動き）
   ======================================== */
a.aff-image {
  display: block;              /* リンク領域を確保 */
  overflow: hidden;            /* 拡大した時にはみ出さないように */
  border-radius: 8px;          /* 角丸を継承 */
}

a.aff-image .article-image {
  width: auto !important;
  max-width: 100%;
  max-height: 400px;           /* さっき決めた高さ */
  object-fit: contain;
  margin: 0 auto;
  
  /* ▼ ここから追加：動きの設定 ▼ */
  transition: transform 0.3s ease, opacity 0.3s ease; /* 0.3秒かけて変化 */
}

/* カーソルが乗った時の動き */
a.aff-image:hover .article-image {
  transform: scale(1.05);      /* 1.05倍にちょっと拡大 */
  opacity: 0.9;                /* ほんの少し透明にして「押せる感」を出す */
}


/* ========================================
   8. テーブル（Moshimo対応・完全統合版）
 ======================================== */

/* --- テーブル全体の基本設定 --- */
.tableContainer.horzScrollShadows.relative {
  overflow-x: auto;
  margin: 1.5em 0;
  -webkit-overflow-scrolling: touch;
  background-color: #fff;
}

.tableContainer.horzScrollShadows.relative table {
  width: 100%;
  border-collapse: collapse;
  line-height: 1.6;
  font-size: 14px;
  background-color: #fff;
  border: none;
}

.tableContainer.horzScrollShadows.relative th,
.tableContainer.horzScrollShadows.relative td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  border-right: none;
  border-left: none;
  white-space: nowrap;
  word-break: normal;
  background-color: #fff !important;
  vertical-align: middle;
}

.tableContainer.horzScrollShadows.relative th {
  background-color: #f9f9f9 !important;
  font-weight: bold;
  color: #000;
}

/* ホバー時の背景色制御 */
.tableContainer.horzScrollShadows.relative tbody tr:hover > td,
.tableContainer.horzScrollShadows.relative tbody tr:hover > th {
  background-color: #fff;
}

.tableContainer.horzScrollShadows.relative tr:last-child td {
  border-bottom: none;
}


/* =======================================================
   【デザイン設定】ボタン・文字書換・Moshimo画像
   ======================================================= */

/* --- ボタンエリア --- */
.aff-btn-wrapper {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

/* --- Amazon/楽天ボタン共通設定（ベタ塗り・白文字・文字書換） --- */
.aff-btn-amazon a,
.aff-btn-rakuten a {
  display: flex !important; /* 中央揃え */
  justify-content: center;
  align-items: center;
  
  /* ★重要：元のテキスト（〜で見る）を隠す魔法 */
  font-size: 0 !important; 
  
  padding: 5px 10px;
  color: #fff !important; /* ★文字色：白 */
  text-decoration: none !important;
  border-radius: 4px;
  line-height: 1.2;
  transition: all 0.2s;
  border: none;
  
  /* ★高級感を出す微細なシャドウ */
  box-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

/* --- 文字の書き換え（CSSで「Amazon」「楽天」を注入） --- */
.aff-btn-amazon a::after {
  content: 'Amazon';
  font-size: 11px !important; /* 文字サイズ復活 */
  font-weight: bold;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.aff-btn-rakuten a::after {
  content: '楽天';
  font-size: 11px !important; /* 文字サイズ復活 */
  font-weight: bold;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- 背景色設定（ベタ塗り） --- */
.aff-btn-amazon a { background-color: #FF9900 !important; }
.aff-btn-rakuten a { background-color: #BF0000 !important; }

/* ホバー時の動き（浮き上がる） */
.aff-btn-amazon a:hover,
.aff-btn-rakuten a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.3); /* 影を濃く */
  opacity: 0.9;
}

/* トラッキングピクセル等の非表示処理 */
.moshimo-img-wrapper > img,
.aff-btn-amazon img,
.aff-btn-rakuten img {
  width: 1px !important;
  height: 1px !important;
  display: inline-block;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* --- Moshimo画像エリア --- */
.product-cell-layout {
  display: flex;
  align-items: center;
  gap: 10px;
}

.moshimo-img-wrapper {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.moshimo-img-wrapper a img {
  width: 60px !important;
  height: 60px !important;
  object-fit: contain;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

.product-name {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9em;
  white-space: normal;
  min-width: 120px;
}
/* =======================================================
   【公式サイトリンク専用ボタン】黒系背景・白抜き文字
   ======================================================= */

a.official-site-link {
  display: inline-flex !important;
  justify-content: center;
  align-items: center;
  
  /* 元のテキスト（「公式サイト」）はそのまま表示 */
  font-size: 11px !important;
  font-weight: bold;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  padding: 5px 10px;
  color: #fff !important; /* 白抜き文字 */
  background-color: #2c3e50 !important; /* ダークグレー（黒系） */
  text-decoration: none !important;
  border-radius: 4px;
  line-height: 1.2;
  transition: all 0.2s;
  border: none;
  box-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

/* ホバー時の動き */
a.official-site-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  background-color: #34495e !important; /* ホバー時に少し明るく */
  opacity: 1;
}

/* 公式サイトリンクの場合は「Amazon」のテキスト上書きをキャンセル */
.aff-btn-amazon a.official-site-link::after {
  content: none !important; /* 「Amazon」テキストを注入しない */
}

/* 公式サイトリンクはAmazonオレンジではなく黒系に */
.aff-btn-amazon a.official-site-link {
  background-color: #2c3e50 !important; /* ダークグレー */
}

.aff-btn-amazon a.official-site-link:hover {
  background-color: #34495e !important; /* ホバー時 */
}



/* =======================================================
   【モバイル設定】レイアウト圧縮＆固定列（max-width: 768px）
   ======================================================= */
@media (max-width: 768px) {

  /* --- 1. すべてのテーブルの初期化（固定解除・リセット） --- */
  .tableContainer.horzScrollShadows.relative table {
    table-layout: auto;
    width: 100%;
    min-width: 100%;
  }

  .tableContainer.horzScrollShadows.relative th,
  .tableContainer.horzScrollShadows.relative td {
    font-size: 12px;
    padding: 8px 6px;
    vertical-align: middle;
    
    position: static !important; 
    left: auto !important;
    border-right: none !important;
    background-color: transparent !important;
    width: auto !important;
    
    /* ★ここを修正：「auto」から「100px」に変更 */
    /* これにより、推奨用途などの長文列が潰れずに横に広がります */
    min-width: 100px !important; 
    
    max-width: none !important;
    white-space: normal !important;
    z-index: auto !important;
  }

  /* --- 2. 比較表（.is-comparison-table）だけの特別設定 --- */
  
  /* ▼ 1列目（製品名）を固定（ここは130pxで維持） */
  .tableContainer.horzScrollShadows.relative.is-comparison-table td:first-child,
  .tableContainer.horzScrollShadows.relative.is-comparison-table th:first-child {
    position: sticky !important;
    left: 0 !important;
    background-color: #fff !important;
    border-right: 1px solid #ddd !important;
    z-index: 3 !important;
    
    /* 1列目は130pxで固定（上の140px設定をここで上書きします） */
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    white-space: normal !important;
  }

  .tableContainer.horzScrollShadows.relative.is-comparison-table th:first-child {
    background-color: #f9f9f9 !important;
    z-index: 4 !important;
  }

  /* ▼ レイアウト変更：製品名（上）／ 画像（左）＋ボタン（右） */
  .tableContainer.horzScrollShadows.relative.is-comparison-table .product-cell-layout {
    display: grid;
    grid-template-columns: 60px 1fr; 
    grid-template-rows: auto auto;
    grid-template-areas:
      "name name"
      "img  btns";
    gap: 4px 6px; 
    align-items: center;
  }

  /* divの枠を無視してグリッド配置 */
  .tableContainer.horzScrollShadows.relative.is-comparison-table .product-info {
    display: contents;
  }

  /* 1. 製品名 */
  .tableContainer.horzScrollShadows.relative.is-comparison-table .product-name {
    grid-area: name;
    font-size: 11px;
    margin-bottom: 0;
    line-height: 1.3;
    min-width: 0;
  }

  /* 2. 画像 */
  .tableContainer.horzScrollShadows.relative.is-comparison-table .moshimo-img-wrapper {
    grid-area: img;
    align-self: start;
    margin: 0;
  }

  /* 3. ボタン */
  .tableContainer.horzScrollShadows.relative.is-comparison-table .aff-btn-wrapper {
    grid-area: btns;
    flex-direction: column;
    gap: 4px;
    width: 100%;
  }

  /* ボタン自体のサイズ調整（スマホ用） */
  .tableContainer.horzScrollShadows.relative.is-comparison-table .aff-btn-amazon a,
  .tableContainer.horzScrollShadows.relative.is-comparison-table .aff-btn-rakuten a {
    width: 100%;
    padding: 3px 0;
    display: flex !important;
  }
}

/* =======================================================
   【PC設定】横スクロール＆1列目固定（min-width: 769px）
   ======================================================= */
@media (min-width: 769px) {
  
  /* テーブルのレイアウト設定 */
  .tableContainer.horzScrollShadows.relative table {
    table-layout: auto; 
    width: auto; /* コンテンツ幅に合わせて広げる */
  }

  /* ▼ 各セルの設定：幅をたっぷりとる */
  .tableContainer.horzScrollShadows.relative th,
  .tableContainer.horzScrollShadows.relative td {
    width: auto;
    white-space: normal; /* 折り返し許可 */
    
    /* ★ここがポイント：最低でも180px確保して、はみ出したらスクロールさせる */
    min-width: 120px !important; 
    
    max-width: 400px;
    vertical-align: middle;
  }

  /* -------------------------------------------------------
     PCでも「1列目」を固定（Sticky）にする設定
     ------------------------------------------------------- */
  .tableContainer.horzScrollShadows.relative.is-comparison-table td:first-child,
  .tableContainer.horzScrollShadows.relative.is-comparison-table th:first-child {
    position: sticky !important;
    left: 0 !important;
    background-color: #fff !important;
    border-right: 1px solid #ddd !important; /* 境界線 */
    z-index: 3 !important;
    
    /* PCなので少し広めに固定幅をとる */
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    
    /* 影をつけて「固定されている感」を出す */
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
  }

  /* ヘッダーの重なり順 */
  .tableContainer.horzScrollShadows.relative.is-comparison-table th:first-child {
    background-color: #f9f9f9 !important;
    z-index: 4 !important;
  }

  /* -------------------------------------------------------
     PC用レイアウト調整（画像・ボタン）
     ------------------------------------------------------- */
  
  /* PCでは横並びのままでOKだが、スペース確保のため調整 */
  .tableContainer.horzScrollShadows.relative.is-comparison-table .product-cell-layout {
    display: flex;
    align-items: center;
    gap: 15px;
  }
  
  .tableContainer.horzScrollShadows.relative.is-comparison-table .moshimo-img-wrapper {
    width: 80px; /* 画像少し大きく */
    height: 80px;
  }
  
  .tableContainer.horzScrollShadows.relative.is-comparison-table .moshimo-img-wrapper a img {
    width: 80px !important;
    height: 80px !important;
  }

  .tableContainer.horzScrollShadows.relative.is-comparison-table .product-name {
    font-size: 14px;
    margin-bottom: 8px;
  }
  
  /* ボタンを横並びに戻す（PCの幅なら入る） */
  .tableContainer.horzScrollShadows.relative.is-comparison-table .aff-btn-wrapper {
    flex-direction: row; 
    gap: 5px;
  }
  
  .tableContainer.horzScrollShadows.relative.is-comparison-table .aff-btn-amazon a,
  .tableContainer.horzScrollShadows.relative.is-comparison-table .aff-btn-rakuten a {
    width: auto;
    padding: 5px 12px;
    display: inline-flex !important;
  }
}

/* ========================================
   9. その他ユーティリティ
   ======================================== */

/* レスポンシブ改行制御 */
@media screen and (min-width: 680px) {
  .pc { display: block; }
  .sp { display: none; }
}

@media screen and (max-width: 680px) {
  .pc { display: none; }
  .sp { display: block; }
}

/* reCAPTCHAバッジ非表示 */
.grecaptcha-badge {
  visibility: hidden;
}

/* JetEngineのリスト非表示対応 */
.jet-listing-not-found {
  display: none;
}

/* Elementor コンテナのギャップリセット */
.e-con > .e-con-inner {
  gap: var(--row-gap) var(--column-gap);
  row-gap: 0px;
  column-gap: 0px;
}

/* ulとolの両方の下に余白を設ける */
ul,
ol {
  margin-bottom: 1.5em; /* 1.5文字分の余白（20pxなどに変更可） */
}

/* ========================================
   10.アプリーチ用CSS
   ======================================== */

.appreach {
  text-align: left;
  padding: 10px;
  border: 1px solid #7C7C7C;
  overflow: hidden;
}
.appreach:after {
  content: "";
  display: block;
  clear: both;
}
.appreach p {
  margin: 0;
}
.appreach a:after {
  display: none;
}
.appreach__icon {
  float: left;
  border-radius: 10%;
  overflow: hidden;
  margin: 0 3% 0 0 !important;
  width: 25% !important;
  height: auto !important;
  max-width: 120px !important;
}
.appreach__detail {
  display: inline-block;
  font-size: 20px;
  line-height: 1.5;
  width: 72%;
  max-width: 72%;
}
.appreach__detail:after {
  content: "";
  display: block;
  clear: both;
}
.appreach__name {
  font-size: 16px;
  line-height: 1.5em !important;
  max-height: 3em;
  overflow: hidden;
}
.appreach__info {
  font-size: 12px !important;
}
.appreach__developper, .appreach__price {
  margin-right: 0.5em;
}
.appreach__posted a {
  margin-left: 0.5em;
}
.appreach__links {
  float: left;
  height: 40px;
  margin-top: 8px;
  white-space: nowrap;
}
.appreach__aslink img {
  margin-right: 10px;
  height: 40px;
  width: 135px;
}
.appreach__gplink img {
  height: 40px;
  width: 134.5px;
}
.appreach__star {
  position: relative;
  font-size: 14px !important;
  height: 1.5em;
  width: 5em;
}
.appreach__star__base {
  position: absolute;
  color: #737373;
}
.appreach__star__evaluate {
  position: absolute;
  color: #ffc107;
  overflow: hidden;
  white-space: nowrap;
}

/* ========================================
   11.筆者コメント用CSS（案1：アクセント強調版）
   ======================================== */

/* 全体の枠組み */
.sagasu-author-comment {
    display: flex;
    gap: 15px;
    margin: 35px 0; /* 前後の余白を少し広げて目立たせる */
    padding: 0;
    background: transparent;
    align-items: flex-start; /* アイコンを上揃えに */
}

/* アイコンエリア */
.author-comment-icon {
    flex-shrink: 0;
    text-align: center;
    width: 70px; /* 横幅を固定して安定させる */
}

.author-comment-icon img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* アイコンも少し浮き上がらせる */
    display: block;
    margin: 0 auto;
}

.author-comment-name {
    font-size: 11px;
    font-weight: bold;
    color: #888;
    margin-top: 6px;
    text-align: center;
    letter-spacing: 0.05em;
}

/* コメントエリア（右側） */
.author-comment-content {
    flex: 1;
    min-width: 0;
}

/* 吹き出し本体（デザインの肝） */
.author-comment-balloon {
    background: #fffbf5; /* 薄いベージュ背景 */
    padding: 18px 22px;  /* 余白を少しリッチに */
    border-radius: 8px;  /* 角を少し四角くして「情報」っぽさを出す */
    position: relative;
    
    /* ▼ここがポイント：左アクセント線と薄い枠線 */
    border: 1px solid #e6dec5; 
    border-left: 5px solid #f39c12; /* 星評価と同じオレンジ色で統一感 */
    
    /* ▼ここがポイント：影を強めて「浮き出し感」を出す */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
    
    font-size: 15px;
    line-height: 1.8; /* 行間を少し広げて読みやすく */
    color: #444;      /* 文字色を少し濃くして視認性UP */
    
    /* 上下中央揃え解除（長文対応のため） */
    display: block; 
}

/* 吹き出し内のpタグの余白調整 */
.author-comment-balloon p {
    margin: 0;
}

/* 三角形はモダンにするため削除（display: none） */
.author-comment-balloon::before {
    display: none;
}


/* --------------------------------------
   スマホ対応
   -------------------------------------- */
@media (max-width: 768px) {
    .sagasu-author-comment {
        gap: 12px;
        margin: 25px 0;
    }
    
    /* アイコンエリアを少し小さく */
    .author-comment-icon {
        width: 55px;
    }
    .author-comment-icon img {
        width: 50px;
        height: 50px;
    }
    
    .author-comment-name {
        font-size: 10px;
        margin-top: 4px;
    }
    
    /* 吹き出しの余白調整 */
    .author-comment-balloon {
        padding: 14px 16px;
        font-size: 14px;
        line-height: 1.7;
    }
}

/* ========================================
   12.スマート追従ボタンのデザイン
   ======================================== */

/* ボタン全体の配置 */
#smart-floating-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

#smart-floating-btn a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  border-radius: 50%; /* 丸いボタン */
  width: 50px;
  height: 50px;
  background-color: #fff; /* 背景白 */
  box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* 影 */
  transition: all 0.3s ease;
  color: #333;
}

#smart-floating-btn a:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.3);
}

/* --------------------------------------
   パターンA：比較表へジャンプ（シンプル特大）
   -------------------------------------- */
#smart-floating-btn.type-comparison a {
  width: auto;
  height: auto;
  /* ▼変更点：パディングをガツンと増やして特大サイズに */
  padding: 15px 30px;
  border-radius: 50px; /* 完全に丸く */
  background-color: #333; /* 色はそのまま */
  color: #fff;
  
  /* レイアウト */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 10px; /* アイコンと文字の間隔も広げる */
  
  /* 影とアニメーションは削除しました */
}

/* タップ（ホバー）時に少しだけ色が薄くなる（反応フィードバック用） */
#smart-floating-btn.type-comparison a:active {
  background-color: #555;
}

/* 簡易アイコン（サイズアップ） */
#smart-floating-btn.type-comparison .smart-btn-icon {
  display: block;
  width: 18px; /* さらに大きく */
  height: 16px; /* さらに大きく */
  border-top: 2px solid #fff;
  border-bottom: 2px solid #fff;
  position: relative;
}
#smart-floating-btn.type-comparison .smart-btn-icon::after {
  content: '';
  position: absolute;
  top: 5px; /* 位置調整 */
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #fff;
}

/* テキスト（サイズアップ） */
.smart-btn-text {
  font-size: 16px; /* 13px→16pxへアップ */
  font-weight: bold;
  letter-spacing: 0.05em;
}


/* --------------------------------------
   パターンB：TOPへ戻る（普通の矢印）
   -------------------------------------- */
#smart-floating-btn.type-top a {
  /* シンプルな丸ボタンのまま */
  background-color: rgba(255,255,255,0.9);
}

/* 矢印アイコン（CSSで描画） */
#smart-floating-btn.type-top a::before {
  content: '';
  width: 10px;
  height: 10px;
  border-top: 2px solid #666;
  border-right: 2px solid #666;
  transform: rotate(-45deg);
  margin-top: 4px; /* 位置微調整 */
}

/* --------------------------------------
   モバイル調整
   -------------------------------------- */
@media (max-width: 768px) {
  #smart-floating-btn {
    bottom: 15px;
    right: 15px;
  }
  
  /* スマホの比較表ボタンは少し控えめに */
  #smart-floating-btn.type-comparison a {
    padding: 8px 14px;
  }
  .smart-btn-text {
    font-size: 12px;
  }
}
/* 比較表へジャンプした時の「上部の余白」設定 */
.is-comparison-table {
  /* ヘッダーの高さ＋少し余裕を持たせた値を指定（例: 80px） */
  scroll-margin-top: 80px;
}

/* ====================================
   13.診断チャート（sagasu.life Ver.）
   ==================================== */
/* チャート全体枠 */
.diagnosis-chart {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 40px 0;
  box-sizing: border-box; /* 念のため */
}

/* 各ルートのボックス */
.diagnosis-box {
  flex: 1;
  min-width: 300px;
  padding: 24px;
  border-radius: 12px;
  border: 2px solid #ddd;
  background: #fff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
}

/* ----------------------------------
   h3タイトルの強力なリセット＆再指定
   ---------------------------------- */
.diagnosis-box h3 {
  /* テーマの装飾を打ち消す */
  background: none !important;
  border: none !important;
  padding: 0 0 10px 0 !important;
  margin: 0 0 16px 0 !important;
  
  /* こちらのデザインを適用 */
  font-size: 1.2em !important; /* 少し大きく */
  text-align: center;
  position: relative; /* 線を描くため */
}

/* 初心者ルート（緑）の設定 */
.diagnosis-box.beginner {
  border-color: #58A05B;
  background-color: #F9FCF9;
}
.diagnosis-box.beginner h3 {
  color: #58A05B !important;
  border-bottom: 2px solid #58A05B !important; /* 強制的に線を引く */
}
.beginner .diagnosis-btn {
  background: #58A05B;
  box-shadow: 0 4px 0 #3E7A41;
}
.beginner .diagnosis-btn:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #3E7A41;
}

/* 中級者ルート（オレンジ）の設定 */
.diagnosis-box.expert {
  border-color: #F37021;
  background-color: #FFFBF9;
}
.diagnosis-box.expert h3 {
  color: #F37021 !important;
  border-bottom: 2px solid #F37021 !important;
}
.expert .diagnosis-btn {
  background: #F37021;
  box-shadow: 0 4px 0 #C45515;
}
.expert .diagnosis-btn:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #C45515;
}

/* ----------------------------------
   リストとボタン共通
   ---------------------------------- */
.diagnosis-box ul {
  margin: 0 0 24px 0 !important;
  padding-left: 20px !important;
  list-style-type: disc !important; /* 黒丸を強制 */
  flex-grow: 1;
}

.diagnosis-box li {
  margin-bottom: 8px;
  font-size: 0.95em;
  line-height: 1.6;
  color: #333; /* 文字色も明示 */
}

.diagnosis-btn {
  display: block;
  text-align: center;
  padding: 14px;
  color: #fff !important;
  font-weight: bold;
  text-decoration: none !important; /* 下線消し */
  border-radius: 50px;
  transition: all 0.2s;
  font-size: 1em;
}

/* スマホ表示の調整 */
@media screen and (max-width: 768px) {
  .diagnosis-chart {
    flex-direction: column;
    gap: 20px;
  }
  .diagnosis-box {
    min-width: auto;
  }
}

/* ========================================
   14. アフィリエイトラッパー・キャッチコピー（更新版）
   ======================================== */

.affiliate-wrapper {
  position: relative;
  margin: 2em 0;
  border: 2px solid #e8820c;
  border-radius: 8px;
  overflow: hidden;
}

.affiliate-catchcopy {
  display: block;
  background-color: #e8820c;
  color: #fff;
  font-size: 0.9em;
  font-weight: bold;
  padding: 8px 16px;
  margin: 0;
  line-height: 1.4;
}

/* もしもの灰色枠を消す */
.affiliate-wrapper .easyLink-box {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

/* Amazonボタンは元の色に戻す */
.affiliate-wrapper .easyLink-info-btn-amazon {
  background: #f79256 !important;
  border-radius: 6px !important;
}

.affiliate-wrapper .easyLink-info-btn-rakuten {
  border-radius: 6px !important;
}

.affiliate-wrapper .easyLink-info-btn-amazon:hover,
.affiliate-wrapper .easyLink-info-btn-rakuten:hover {
  opacity: 0.85;
}

@media screen and (max-width: 480px) {
    div.easyLink-box.easyLink-size-s, div.easyLink-box.easyLink-size-xs {
        margin: 20px auto 0;
        padding: 20px;
        max-width: 100% !important;
        box-sizing: border-box;
    }
}

/* ========================================
   15. 画像イメージ注記
   ======================================== */

.image-note {
  display: block;
  font-size: 0.8em;
  color: #999;
  margin-top: 2px;
  font-style: normal;
}