/* TubeAffi 商品カード v2 — テーマ非依存・モバイルファースト
   シグネチャ: カード上端の3モールカラーエッジ（アンバー→クリムゾン→レッド） */

.taffi-card {
  position: relative;
  display: flex;
  gap: 20px;
  padding: 24px;
  margin: 2em 0;
  background: #ffffff;
  border: 1px solid #e9e4d8;
  border-radius: 14px;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(30, 26, 20, 0.04), 0 14px 34px -18px rgba(30, 26, 20, 0.18);
  color: #1f2328;
  line-height: 1.5;
  overflow: hidden;
}
.taffi-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, #e08a00 0%, #e08a00 32%, #bf0000 36%, #bf0000 64%, #e8113c 68%, #e8113c 100%);
}

.taffi-card__media {
  flex: none;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #faf8f2;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(30, 26, 20, 0.05);
  overflow: hidden;
}
.taffi-card__media img.taffi-card__image {
  max-width: 88%;
  max-height: 88%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0;
  box-shadow: none;
}

.taffi-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.taffi-card__title {
  margin: 2px 0 10px;
  font-weight: 700;
  font-size: 1.05em;
  line-height: 1.5;
  letter-spacing: 0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.taffi-card__price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 2px;
}
.taffi-card__price-label {
  font-size: 0.68em;
  font-weight: 700;
  color: #7b8178;
  border: 1px solid #d9d3c4;
  border-radius: 999px;
  padding: 2px 9px;
  letter-spacing: 0.08em;
}
.taffi-card__price {
  font-size: 1.45em;
  font-weight: 800;
  color: #c0392b;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.taffi-card__price-note {
  font-size: 0.7em;
  color: #857f70;
}

.taffi-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0 0;
  font-size: 0.84em;
  text-decoration: none !important;
  color: inherit;
  width: fit-content;
}
.taffi-card__rating:hover .taffi-card__rating-note { color: #857f70; text-decoration: underline; }
.taffi-stars {
  position: relative;
  display: inline-block;
  color: #ddd6c6;
  letter-spacing: 2px;
  line-height: 1;
}
.taffi-stars__fill {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #e8a33d;
}
.taffi-card__rating-avg {
  font-weight: 800;
  color: #a4761c;
}
.taffi-card__rating-note {
  color: #b0aa9c;
  font-size: 0.85em;
}

.taffi-card__buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: 14px;
}
.taffi-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px 13px 12px;
  border-radius: 10px;
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 800;
  font-size: 0.88em;
  letter-spacing: 0.02em;
  border: none;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.taffi-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}
.taffi-btn::after {
  content: "›";
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-54%);
  font-size: 1.1em;
  font-weight: 800;
  opacity: 0.85;
}
.taffi-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
  color: #ffffff !important;
}
.taffi-btn:focus-visible {
  outline: 2px solid #1f2328;
  outline-offset: 2px;
}
.taffi-btn--amazon {
  background: #232f3e;
  box-shadow: 0 6px 14px -6px rgba(35, 47, 62, 0.55);
}
.taffi-btn--amazon::after { color: #ff9900; opacity: 1; }
.taffi-btn--rakuten {
  background: #b00000;
  box-shadow: 0 6px 14px -6px rgba(176, 0, 0, 0.5);
}
.taffi-btn--yahoo {
  background: #e8113c;
  box-shadow: 0 6px 14px -6px rgba(232, 17, 60, 0.5);
}
.taffi-btn--amazon:hover { box-shadow: 0 10px 20px -8px rgba(35, 47, 62, 0.65); }
.taffi-btn--rakuten:hover { box-shadow: 0 10px 20px -8px rgba(176, 0, 0, 0.6); }
.taffi-btn--yahoo:hover { box-shadow: 0 10px 20px -8px rgba(232, 17, 60, 0.6); }

.taffi-card__credit {
  margin-top: 12px;
  font-size: 0.7em;
  color: #857f70;
  letter-spacing: 0.03em;
  text-align: right;
}

@media (max-width: 560px) {
  .taffi-card {
    flex-direction: column;
    gap: 16px;
    padding: 18px 18px 16px;
  }
  .taffi-card__media {
    width: 100%;
    height: 190px;
  }
  .taffi-card__buttons { grid-template-columns: 1fr; }
  .taffi-card__credit { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .taffi-btn { transition: none; }
  .taffi-btn:hover { transform: none; }
}

/* --- 順位バッジ（ランキング記事） --- */
.taffi-rank {
  position: absolute;
  top: -1px;
  left: 16px;
  z-index: 2;
  padding: 8px 10px 6px;
  border-radius: 0 0 8px 8px;
  color: #fff;
  font-weight: 800;
  font-size: 0.82em;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 8px -3px rgba(0, 0, 0, 0.4);
}
.taffi-rank--1 { background: linear-gradient(160deg, #d4a017, #b8860b); }
.taffi-rank--2 { background: linear-gradient(160deg, #9fa8b3, #7d8894); }
.taffi-rank--3 { background: linear-gradient(160deg, #b5713f, #96562a); }
.taffi-rank--other { background: #6d7278; }
.taffi-card .taffi-rank + .taffi-card__media { margin-top: 12px; }

/* --- 良い点/気になる点（動画内評価） --- */
.taffi-eval-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}
.taffi-eval-row .taffi-eval { margin: 0; }
@media (max-width: 600px) {
  .taffi-eval-row { grid-template-columns: 1fr; }
}
.taffi-eval {
  border-radius: 10px;
  padding: 12px 16px;
  margin: 10px 0;
  border: 1px solid;
  font-size: 0.92em;
}
.taffi-eval--good {
  background: #f2f7ee;
  border-color: #cfe0c3;
}
.taffi-eval--bad {
  background: #faf3ec;
  border-color: #e8d5bd;
}
.taffi-eval__label {
  margin: 0 0 6px;
  font-weight: 800;
  font-size: 0.88em;
  letter-spacing: 0.04em;
}
.taffi-eval--good .taffi-eval__label { color: #3c6e33; }
.taffi-eval--bad .taffi-eval__label { color: #a05c1c; }
.taffi-eval ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.taffi-eval li {
  position: relative;
  list-style: none !important;
  padding-left: 1.5em;
  margin: 4px 0 !important;
  line-height: 1.6;
}
.taffi-eval li::marker { content: "" !important; }
.taffi-eval--good li::before {
  content: "○";
  position: absolute;
  left: 0.1em;
  color: #4c8a3f;
  font-weight: 800;
}
.taffi-eval--bad li::before {
  content: "△";
  position: absolute;
  left: 0.1em;
  color: #c07a2c;
  font-weight: 800;
}

/* --- ランキング比較表 --- */
.taffi-rtable-wrap {
  overflow-x: auto;
  margin: 1.8em 0;
  border: 1px solid #e9e4d8;
  border-radius: 12px;
  /* スクロール影: 右端に続きがあるときだけ影が出る（background-attachment: local方式） */
  background:
    linear-gradient(90deg, #fff 30%, rgba(255,255,255,0)) left / 40px 100%,
    linear-gradient(270deg, #fff 30%, rgba(255,255,255,0)) right / 40px 100%,
    radial-gradient(farthest-side at 0 50%, rgba(30,26,20,.18), transparent) left / 14px 100%,
    radial-gradient(farthest-side at 100% 50%, rgba(30,26,20,.18), transparent) right / 14px 100%,
    #fff;
  background-repeat: no-repeat;
  background-attachment: local, local, scroll, scroll, scroll;
}
/* SPのみ: 表がはみ出す幅ではヒント文を出す */
@media (max-width: 767px) {
  .taffi-rtable-wrap::before {
    content: "→ 横にスライドできます";
    display: block;
    padding: 6px 12px 0;
    font-size: 11px;
    color: #857f70;
    text-align: right;
  }
}
.taffi-rtable {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 0.88em;
}
.taffi-rtable th {
  background: #2e5e4e;
  color: #f9f6ec;
  padding: 10px 12px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.taffi-rtable td {
  padding: 10px 12px;
  border-top: 1px solid #f0ece2;
  vertical-align: middle;
}
.taffi-rtable tbody tr:nth-child(even) td { background: #fbf9f4; }
.taffi-rtable__rank .taffi-rank {
  position: static;
  display: inline-block;
  border-radius: 8px;
  padding: 5px 9px;
  box-shadow: none;
}
.taffi-rtable__product { min-width: 200px; }
.taffi-rtable__product-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  line-height: 1.4;
}
.taffi-rtable__product img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 6px;
  background: #faf8f2;
  flex: none;
}
.taffi-rtable__rating b { color: #a4761c; }
.taffi-rtable__rating small {
  display: block;
  color: #b0aa9c;
  font-size: 0.82em;
}
.taffi-rtable__price b { color: #c0392b; }
.taffi-rtable__links-inner {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.taffi-rtable__link {
  display: inline-block;
  padding: 9px 12px; /* タップ領域: 高さ約38pxを確保 */
  border-radius: 6px;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.85em;
  font-weight: 700;
  white-space: nowrap;
}
.taffi-rtable__link--amazon { background: #232f3e; }
.taffi-rtable__link--rakuten { background: #b00000; }
.taffi-rtable__link--yahoo { background: #e8113c; }
.taffi-rtable__link:hover { filter: brightness(1.1); }
.taffi-rtable__note {
  margin: 8px 12px 10px;
  font-size: 0.7em;
  color: #857f70;
}
/* 順位なしモード（showRank:false）: 1列減るぶん横スクロールの発生を遅らせる */
.taffi-rtable--norank { min-width: 480px; }

/* YouTube埋め込み: テーマによらず常に16:9を維持（スマホの縦伸び防止） */
.wp-block-embed-youtube .wp-block-embed__wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
}
.wp-block-embed-youtube .wp-block-embed__wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* 冒頭の統合表記（広告+AI）: 法令上冒頭必須のため位置は固定し、控えめだが読める濃さに
   （旧#a5a29bは実測2.6:1でWCAG AA未達。子テーマ側の修正はこのファイルが後読みで負けるため発生源で直す） */
p.taffi-notice {
  font-size: 12px;
  color: #7d776a;
  text-align: right;
  margin: 0 0 12px;
  line-height: 1.4;
}

/* 比較表の商品名は2行まで */
.taffi-rtable__product span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- お気に入りボタン（右下フローティング・SPは下部ナビの上） --- */
button.taffi-fav,
.taffi-fav {
  position: fixed;
  right: 14px;
  bottom: 88px; /* SP: フッター追従ナビの上 */
  z-index: 2147483000 !important; /* 常に最前面レイヤー */
  width: auto !important;
  max-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1.5px solid #d9483b;
  border-radius: 999px;
  background: #fff;
  color: #d9483b;
  font-weight: 800;
  font-size: 0.9em;
  cursor: pointer;
  box-shadow: 0 8px 22px -8px rgba(30, 26, 20, 0.45);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
@media (min-width: 768px) {
  .taffi-fav { right: 28px; bottom: 28px; }
}
.taffi-fav__icon { font-size: 1.15em; line-height: 1; }
.taffi-fav:hover { transform: translateY(-1px); }
.taffi-fav.is-active {
  background: #d9483b;
  color: #fff;
}
.taffi-fav:focus-visible { outline: 2px solid #1f2328; outline-offset: 2px; }

/* --- お気に入り一覧 --- */
.taffi-fav-list__status,
.taffi-fav-list__empty { color: #8a8f98; }
.taffi-fav-list__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 10px 0;
}
.taffi-fav-card {
  position: relative;
  background: #fff;
  border: 1px solid #e9e4d8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px -14px rgba(30, 26, 20, 0.25);
}
.taffi-fav-card__link { text-decoration: none !important; color: inherit; display: block; }
.taffi-fav-card__link img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.taffi-fav-card__title {
  margin: 0;
  padding: 12px 14px 14px;
  font-size: 0.88em;
  font-weight: 700;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.taffi-fav-card__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(31, 35, 40, 0.65);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.taffi-fav-card__remove:hover { background: #d9483b; }

/* リンク版FAB（記事以外のページ） */
a.taffi-fav,
a.taffi-fav:hover {
  text-decoration: none !important;
  color: #d9483b;
}

/* ===== よくある質問（FAQ） ===== */
.mg-faq {
    display: grid;
    gap: 10px;
    margin: 1.2em 0 2em;
}
.mg-faq__item {
    border: 1px solid #e3e0d8;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.mg-faq__item summary {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 14px 16px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.mg-faq__item summary::-webkit-details-marker { display: none; }
.mg-faq__item summary::before {
    content: "Q";
    flex: none;
    font-weight: 800;
    color: #2e7d32;
}
.mg-faq__item[open] summary { border-bottom: 1px dashed #e3e0d8; }
.mg-faq__item p {
    margin: 0;
    padding: 12px 16px 14px 16px;
    display: flex;
    gap: 10px;
    align-items: baseline;
}
.mg-faq__item p::before {
    content: "A";
    flex: none;
    font-weight: 800;
    color: #c62828;
}

/* ===== 本文中の商品アフィリリンク ===== */
a.mg-item {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}
a.mg-item::after {
    content: "🛒";
    font-size: 0.8em;
    margin-left: 3px;
}

/* ===== 冒頭の要点ブロック（3行でわかる／黒板の帯＋赤ペンの採点丸） ===== */
.mg-lead {
    position: relative;
    margin: 1.5em 0 2.2em;
    background: #FFFDF7;
    border: 1.5px solid rgba(35, 74, 60, 0.16);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(35, 74, 60, 0.06), 0 8px 20px rgba(35, 74, 60, 0.07);
}
/* 見出し = 黒板の帯 */
.mg-lead h2.mg-lead__title {
    margin: 0;
    padding: 13px 20px 12px 50px;
    border: 0;
    border-radius: 0;
    background: linear-gradient(180deg, #2E5E4E 0%, #27503F 100%);
    color: #F6F1E6;
    font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
    font-weight: 900;
    font-size: 1.06em;
    line-height: 1.45;
    letter-spacing: 0.08em;
    position: relative;
    /* チョークの罫 */
    border-bottom: 1px dashed rgba(249, 246, 236, 0.32);
}
/* 和英併記（サイトの見出し慣習に合わせる。目次には出ないCSS生成文字） */
.mg-lead h2.mg-lead__title::after {
    content: "POINT";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.62em;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: rgba(249, 246, 236, 0.62);
}
/* 赤ペンの採点マル */
.mg-lead h2.mg-lead__title::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 50%;
    width: 19px;
    height: 19px;
    margin-top: -11px;
    border: 2.5px solid #E4695C;
    border-radius: 50%;
    transform: rotate(-8deg);
}
/* 本文 = ノート紙 */
.mg-lead > ul {
    counter-reset: mg-lead;
    list-style: none;
    margin: 0;
    padding: 16px 22px 18px;
    display: grid;
    gap: 12px;
}
.mg-lead > ul > li {
    counter-increment: mg-lead;
    position: relative;
    margin: 0;
    padding-left: 36px;
    line-height: 1.85;
    font-size: 0.97em;
    font-weight: 500;
    color: #2A2A26;
}
.mg-lead > ul > li + li {
    padding-top: 12px;
    border-top: 1px dashed rgba(35, 74, 60, 0.16);
}
.mg-lead > ul > li::before {
    content: counter(mg-lead);
    position: absolute;
    left: 0;
    top: 4px;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 2px solid #D9483B;
    border-radius: 50%;
    color: #D9483B;
    font-family: "Zen Kaku Gothic New", sans-serif;
    font-weight: 900;
    font-size: 12.5px;
    line-height: 1;
    background: #fff;
}
.mg-lead > ul > li + li::before { top: 16px; }
.mg-lead > ul > li::marker { content: none; }
@media (max-width: 767px) {
    .mg-lead h2.mg-lead__title { padding: 12px 16px 11px 44px; font-size: 1em; }
    .mg-lead h2.mg-lead__title::after { display: none; }
    .mg-lead h2.mg-lead__title::before { left: 15px; }
    .mg-lead ul { padding: 14px 16px 16px; gap: 10px; }
    .mg-lead li { padding-left: 32px; font-size: 0.95em; }
    .mg-lead li::before { width: 22px; height: 22px; font-size: 12px; }
}

/* Amazonアソシエイト規約 第5条の表示（フッター最下部・控えめだが読める大きさ） */
.taffi-amazon-disclosure {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px 14px;
    text-align: center;
    font-size: 11.5px;
    line-height: 1.7;
    color: #6E7A72;
}

/* ---- 価格の動き（当サイトの日次記録による一次データ） ---- */
.taffi-trend {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
  padding: 8px 10px;
  background: #f6f8f7;
  border-radius: 8px;
  color: #2e5e4e;
}
.taffi-trend .taffi-spark {
  flex: 0 0 auto;
  color: #2e5e4e;
  opacity: .85;
}
.taffi-trend__text {
  margin: 0;
  font-size: 13px; /* remはテーマのroot=10pxで潰れる。px直指定 */
  line-height: 1.6;
  color: #3d4b46;
}
.taffi-trend__note {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: #8a9a93;
}
@media (max-width: 480px) {
  .taffi-trend { gap: 8px; padding: 7px 8px; }
  .taffi-trend .taffi-spark { width: 84px; height: 24px; }
  .taffi-trend__text { font-size: 12.5px; }
}

/* ---- あわせて読みたい（内部リンク） ---- */
ul.mg-related {
  margin: 0 0 1.6em;
  padding: 14px 18px 14px 34px;
  list-style: disc;
  background: #f9f6ec;
  border-left: 4px solid #2e5e4e;
  border-radius: 0 8px 8px 0;
}
ul.mg-related li { margin: 0; padding: 3px 0; }
ul.mg-related a {
  color: #234a3c;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(35, 74, 60, .3);
}
ul.mg-related a:hover { color: #d9483b; border-bottom-color: #d9483b; }

/* ---- 記事一覧（ハブページ・[taffi_article_index]） ---- */
.mg-index { display: grid; gap: 30px; }
.mg-index__heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #234a3c;
  font-size: 1.12em;
}
.mg-index__heading a { color: #234a3c; text-decoration: none; }
.mg-index__heading a:hover { color: #d9483b; }
.mg-index__count { font-size: .72em; font-weight: 600; color: #8a9a93; }
.mg-index__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.mg-index__item { margin: 0; }
.mg-index__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid rgba(35, 74, 60, .14);
  border-radius: 10px;
  text-decoration: none;
  transition: box-shadow .18s, transform .18s;
}
.mg-index__link:hover {
  box-shadow: 0 4px 16px rgba(35, 74, 60, .14);
  transform: translateY(-1px);
}
.mg-index__thumb {
  flex: 0 0 auto;
  width: 104px;
  height: 58px;
  object-fit: cover;
  border-radius: 6px;
  background: #eef1ef;
}
.mg-index__thumb--none { display: inline-block; }
.mg-index__title {
  flex: 1;
  color: #333;
  line-height: 1.55;
  font-size: .95em;
}
.mg-index__link:hover .mg-index__title { color: #d9483b; }
.mg-index__date {
  flex: 0 0 auto;
  font-size: .76em;
  color: #8a9a93;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .mg-index__link { gap: 10px; padding: 8px 10px; align-items: flex-start; }
  .mg-index__thumb { width: 84px; height: 47px; }
  .mg-index__title { font-size: .88em; }
  .mg-index__date { display: none; } /* 狭い画面では日付よりタイトルの行数を優先 */
}

/* ---- トップ: サイト紹介＋カテゴリナビ（[taffi_category_nav]・モックアップ準拠） ---- */
.mg-catnav { margin: 14px 0 30px; text-align: center; }
.mg-catnav__eyebrow {
  margin: 0 0 10px;
  font-size: .88em;
  letter-spacing: .12em;
  color: #6f7f4f;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
}
.mg-catnav__title {
  margin: 0 0 16px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 600;
  font-size: clamp(1.5em, 3.4vw, 2.15em);
  line-height: 1.5;
  color: #234a3c;
  letter-spacing: .04em;
}
.mg-catnav__intro {
  max-width: 640px;
  margin: 0 auto 26px;
  font-size: .93em;
  line-height: 2;
  color: #4a5b54;
}
.mg-catnav__grid {
  display: grid;
  /* サイドバーがある本文カラム(約730px)でも5カテゴリが1列に収まる幅 */
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 10px;
  text-align: center;
}
.mg-catnav__card {
  display: flex;
  flex-direction: column;
  background: #faf8f2;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(35, 74, 60, .07);
  transition: box-shadow .18s, transform .18s;
}
.mg-catnav__card:hover { box-shadow: 0 8px 22px rgba(35, 74, 60, .16); transform: translateY(-2px); }
.mg-catnav__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 9px 12px;
  flex: 1;
}
.mg-catnav__icon { color: #234a3c; }
.mg-catnav__name { color: #234a3c; font-weight: 700; font-size: 1.02em; }
.mg-catnav__rule { width: 26px; height: 2px; background: #c9a44b; }
.mg-catnav__desc { font-size: .78em; line-height: 1.75; color: #5a6a63; }
.mg-catnav__photo {
  display: block;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
}
.mg-catnav__more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 6px;
  background: #234a3c;
  color: #fff;
  font-size: .84em;
  font-weight: 600;
}
.mg-catnav__arrow { transition: transform .18s; }
.mg-catnav__card:hover .mg-catnav__arrow { transform: translateX(3px); }
.mg-catnav__features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px 24px;
  margin-top: 22px;
  padding: 16px 18px;
  background: #faf8f2;
  border: 1px solid rgba(35, 74, 60, .1);
  border-radius: 10px;
  text-align: left;
}
.mg-catnav__feature { display: flex; gap: 12px; align-items: flex-start; }
.mg-catnav__feature-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #2e5e4e;
  color: #fff;
}
.mg-catnav__feature-body { display: flex; flex-direction: column; gap: 2px; }
.mg-catnav__feature-body strong { color: #234a3c; font-size: .92em; }
.mg-catnav__feature-body span { font-size: .8em; line-height: 1.7; color: #5a6a63; }
@media (max-width: 560px) {
  .mg-catnav__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ---- トップ: いま安くなっている商品（[taffi_deals]） ---- */
.mg-deals { margin: 34px 0 10px; }
.mg-deals__heading {
  margin: 0 0 4px;
  padding-bottom: 8px;
  border-bottom: 2px solid #234a3c;
  color: #234a3c;
  font-size: 1.12em;
}
.mg-deals__note { margin: 8px 0 16px; font-size: .8em; color: #8a9a93; }
.mg-deals__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.mg-deals__grid .taffi-card { margin: 0; }

/* GOLD BLOGは main_top/main_bottom のウィジェットを2列組（c-columns-is-2）にするが、
   カテゴリナビと「いま安い」は全幅で使うブロックなので1列に戻す */
.c-main_top:has(.mg-catnav),
.c-main_bottom:has(.mg-deals) {
  display: block;
}
.c-main_top .widget:has(.mg-catnav),
.c-main_bottom .widget:has(.mg-deals) {
  width: 100%;
  max-width: 100%;
}

/* ---- ボタンのモール別価格（kakaku.com方式の並記） ---- */
.taffi-btn { display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.taffi-btn__price {
  font-size: .82em;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.taffi-btn__lowest {
  font-style: normal;
  font-size: .78em;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: #b00000;
  font-weight: 700;
}
.taffi-btn.is-lowest { box-shadow: 0 0 0 2px rgba(176, 0, 0, .35); }

/* ---- 人気の記事（サイドバー・[taffi_popular]） ---- */
.mg-popular__heading {
  margin: 0 0 10px;
  padding: 6px 10px;
  border: 1px dashed rgba(255, 255, 255, .55);
  background: #234a3c;
  color: #fff;
  font-size: .92em;
  border-radius: 4px;
}
.mg-popular__list { list-style: none; margin: 0; padding: 0; }
.mg-popular__item { border-bottom: 1px dashed rgba(35, 74, 60, .25); }
.mg-popular__item:last-child { border-bottom: 0; }
.mg-popular__item a {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 2px;
  text-decoration: none;
  color: #333;
  font-size: .88em;
  line-height: 1.55;
}
.mg-popular__item a:hover .mg-popular__title { color: #d9483b; }
.mg-popular__rank {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: .8em;
  font-weight: 700;
  background: #e8ebe8;
  color: #4a5b54;
}
.mg-popular__rank--1 { background: #c9a44b; color: #fff; }
.mg-popular__rank--2 { background: #a8adb3; color: #fff; }
.mg-popular__rank--3 { background: #b07a4d; color: #fff; }
.mg-popular__note { margin: 8px 0 0; font-size: .72em; color: #8a9a93; }

/* 公式ストアバッジ（リンク先がメーカー公式のとき） */
.taffi-btn__official {
  font-style: normal;
  font-size: .78em;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #1e5c46;
  font-weight: 700;
}

/* ---- 横断ランキングページ（[taffi_ranking]） ---- */
.mg-ranking { margin: 0 0 24px; }
.mg-ranking__lead {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f4f7f4;
  color: #4a5b54;
  font-size: .84em;
  line-height: 1.8;
}
.mg-ranking__nav { margin: 0 0 26px; }
.mg-ranking__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
/* liをlist-item以外のdisplayにするとマーカー(・)は仕様上出ない。
   テーマの .main_content ul li 系のマーカー指定が後勝ちしても効かない確実な方法 */
.mg-ranking__nav li {
  display: inline-flex;
  padding: 0;
  margin: 0;
  border: 0;
}
/* .main_content li a（子テーマの本文リンク: 赤下線）より高い特異度で
   「ボタンであってテキストリンクではない」見た目を確定させる */
.main_content .mg-ranking__nav li a,
.mg-ranking__nav a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(35, 74, 60, .3);
  border-radius: 999px;
  color: #234a3c;
  font-size: .8em;
  font-weight: 700;
  text-decoration: none;
  background: #fff;
}
.main_content .mg-ranking__nav li a:hover,
.mg-ranking__nav a:hover { background: #234a3c; color: #fff; }
.mg-ranking__overall,
.mg-ranking__products,
.mg-ranking__cat { margin: 0 0 34px; scroll-margin-top: 80px; }
.mg-ranking__heading {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #234a3c;
  color: #234a3c;
  font-size: 1.12em;
}
.mg-ranking__heading a { color: inherit; text-decoration: none; }
.mg-ranking__heading a:hover { color: #d9483b; }
.mg-ranking__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}
.mg-ranking__grid .taffi-card { margin: 0; }

/* --- 一覧用の小さい商品カード（.mg-pcard） ---
   記事本文用の大きなカードとは別物。狭い列に4枚並べる前提で、
   サムネ→名前→評価→価格→モールチップ だけに絞っている。 */
.mg-pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e9e4d8;
  border-radius: 12px;
  overflow: hidden;
  color: #1f2328;
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(30, 26, 20, .04);
  transition: transform .16s ease, box-shadow .16s ease;
}
.mg-pcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -14px rgba(30, 26, 20, .35);
}
/* 順位は記事内カードと同じ表彰台の色。枠の上辺からぶら下げる */
.mg-pcard__rank {
  position: absolute;
  top: 0;
  left: 12px;
  z-index: 2;
  padding: 5px 8px 4px;
  border-radius: 0 0 7px 7px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
}
.mg-pcard__rank--1 { background: linear-gradient(160deg, #d4a017, #b8860b); }
.mg-pcard__rank--2 { background: linear-gradient(160deg, #9fa8b3, #7d8894); }
.mg-pcard__rank--3 { background: linear-gradient(160deg, #b5713f, #96562a); }
.mg-pcard__rank--other { background: #6d7278; }

.mg-pcard__media {
  background: #faf7ef;
  border-bottom: 1px solid #efe9dc;
  padding: 10px;
}
.mg-pcard__img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  margin: 0;
}
.mg-pcard__img--none { background: repeating-linear-gradient(135deg, #f2ece0 0 8px, #ece5d6 8px 16px); }

.mg-pcard__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 11px 11px;
  flex: 1;
}
/* テーマが本文中の p に margin 24px / font-size 16px を当てるため、
   カード内は詳細度を上げて打ち消す（クラス2つ＝0,2,0） */
.mg-pcard .mg-pcard__title,
.mg-pcard .mg-pcard__rating,
.mg-pcard .mg-pcard__price { margin: 0; }

.mg-pcard .mg-pcard__title {
  color: #234a3c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .01em;
  /* 型番まで見せる。2行だと「マキタ コードレスクリーナー…」で切れて
     同じメーカーの機種を見分けられなかった */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* ★は絵を並べず数字に畳む（小さい面では読み取りが速い） */
.mg-pcard .mg-pcard__rating {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 11px;
  line-height: 1.3;
  color: #7b8178;
}
.mg-pcard__star { color: #e8a33d; }
.mg-pcard .mg-pcard__rating b { color: #3d4340; font-weight: 700; }
.mg-pcard .mg-pcard__rating small { font-size: .92em; }

.mg-pcard .mg-pcard__price {
  color: #c0392b;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
.mg-pcard .mg-pcard__price span { font-size: .66em; font-weight: 700; margin-left: 1px; }
.mg-pcard .mg-pcard__price--none { color: #9a958a; font-size: 12px; font-weight: 700; }

.mg-pcard .mg-pcard__price { margin-top: auto !important; padding-top: 6px; }
.mg-pcard__malls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 7px;
}
.mg-pcard__mall {
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px 7px; /* A4: 高さ26px以上を確保 */
  border-radius: 6px;
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: filter .15s ease;
}
.mg-pcard__mall:hover { filter: brightness(1.12); }
.mg-pcard__mall--amazon  { background: #232f3e; }
.mg-pcard__mall--rakuten { background: #b00000; }
.mg-pcard__mall--yahoo   { background: #e8113c; }

@media (prefers-reduced-motion: reduce) {
  .mg-pcard, .mg-pcard__mall { transition: none; }
  .mg-pcard:hover { transform: none; }
}
.mg-ranking__list { list-style: none; margin: 0; padding: 0; }
.mg-ranking__item { border-bottom: 1px dashed rgba(35, 74, 60, .25); }
.mg-ranking__item:last-child { border-bottom: 0; }
.mg-ranking__link {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 2px;
  text-decoration: none;
  color: #333;
  line-height: 1.55;
}
.mg-ranking__link:hover .mg-ranking__title { color: #d9483b; }
.mg-ranking__thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 5px;
  background: #eef1ee;
  display: block;
}
.mg-ranking__thumb--none { border: 1px dashed rgba(35, 74, 60, .2); }
.mg-ranking__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mg-ranking__cat-label {
  align-self: flex-start;
  font-size: .68em;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e8efe9;
  color: #3d6354;
}
.mg-ranking__title { font-size: .9em; font-weight: 600; }
.mg-ranking__more { margin: 10px 0 0; text-align: right; font-size: .8em; }
.mg-ranking__more a { color: #234a3c; }
.mg-ranking__empty { color: #8a9a93; font-size: .88em; }
@media (max-width: 560px) {
  .mg-ranking__thumb { width: 58px; height: 40px; }
}

/* ---- 人気の商品ウィジェット（[taffi_popular_products] / [taffi_popular_mix]） ---- */
.mg-popular-mix > .mg-popular + .mg-popular { margin-top: 22px; }
.mg-popular--products .mg-popular__item a { align-items: center; }
.mg-popular__thumb {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 5px;
}
.mg-popular__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mg-popular__price { font-size: .84em; font-weight: 700; color: #b00000; }
.mg-popular__more { margin: 10px 0 0; text-align: right; font-size: .78em; }
.mg-ranking__more-link { color: #234a3c; font-weight: 700; }

/* ---- お気に入り0件のときのおすすめ ---- */
.taffi-fav-list__empty-text { color: #8a8f98; }
.taffi-fav-list__reco { margin-top: 26px; }
.taffi-fav-list__reco-lead {
  margin: 0 0 14px;
  color: #4a5b54;
  font-size: .88em;
  font-weight: 700;
}
.taffi-fav-list__reco .mg-ranking__products { margin-bottom: 26px; }
