/*
Theme Name: パパ検証ラボ
Description: 育児×ガジェット・スマートホーム化ブログ用オリジナルテーマ（検証ログ形式）
Version: 5.5
*/

:root {
  /* ヒーロー画像のベース背景色(#fdfcfb)と完全一致させ、画像の外枠が見えるのを防ぐ */
  --bg: #fdfcfb;
  --ink: #1a1a1a;
  --ink-soft: #6b6b64;
  --ink-faint: #9a9a92;
  --line: #e8e3e0;
  --accent: #a13328;
  --accent-tint: #f7ece9;
  --accent-tint-2: #efd9d4;
  --shadow: 0 1px 0 rgba(26,26,26,0.03);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18120f;
    --ink: #efe8e5;
    --ink-soft: #b0a29c;
    --ink-faint: #7d716c;
    --line: #33251f;
    --accent: #d97a6c;
    --accent-tint: #2a1d18;
    --accent-tint-2: #402a22;
    --shadow: 0 1px 0 rgba(0,0,0,0.3);
  }
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Yu Gothic", "游ゴシック", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  font-size: 16.5px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

.mincho { font-family: "Yu Mincho", "游明朝", "YuMincho", "Hiragino Mincho ProN", serif; }
.mono {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

a { color: var(--accent); text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--accent);
  border-bottom: 1px solid transparent; transition: border-color .15s ease, gap .15s ease;
}
.link-arrow:hover { border-color: var(--accent); gap: 10px; }

/* ---- アフィリエイトリンク用CTAボタン（記事本文中で [cta_link] ショートコードとして使う） ---- */
.cta-button {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--accent);
  font-family: "Yu Gothic", sans-serif; font-weight: 600; font-size: 15.5px;
  padding: 13px 28px; margin: 10px 0 28px;
  border: 2px solid var(--accent); text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.cta-button::after { content: "→"; }
.cta-button:hover { background: var(--accent); color: var(--bg); }

/* CTAボタン直下の一言（マイクロコピー）。段落ブロックの「追加CSSクラス」に cta-note と入力して使う */
.entry-content p.cta-note {
  margin-top: -20px;
  margin-bottom: 30px;
  font-size: 13px;
  line-height: 1.7;
}

/* ---- ショップリンク（楽天=本命の3ボタン）。本文中で [shop_links] ショートコードとして使う ---- */
.entry-content .shop-links {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin: 10px 0 40px; /* 下マージンを28→40pxに。朱色が続いた直後に来る見出しとの視覚的な区切りを作る */
  position: relative; /* track-pixelをabsoluteで浮かせるための基準 */
}
.entry-content .shop-links .lead {
  margin: 0; padding: 0; text-align: center; line-height: 1.6;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 12px; letter-spacing: 0.04em; color: var(--ink-soft);
  width: 100%; max-width: 360px;
}
/* 商品名ラベル（.eyebrowと同じ朱色・太字・字間広めの語法を流用。注釈と同じ薄グレーだと存在感が無さすぎたため） */
.entry-content .shop-links .product-label {
  margin: 0; padding: 0; text-align: center;
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 13px; letter-spacing: 0.06em; font-weight: 700; color: var(--accent);
  width: 100%; max-width: 360px;
}
.entry-content .shop-links a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: "Yu Gothic", sans-serif; font-weight: 600;
  text-decoration: none;
  transition: background-color .15s ease, gap .15s ease;
}
.entry-content .shop-links a::after { content: "→"; }
/* 本命：楽天（塗りつぶし。既存 .cta-button のホバー状態と同じ配色） */
.entry-content .shop-links .shop-btn--primary {
  background: var(--accent); color: var(--bg);
  border: 2px solid var(--accent);
  font-size: 15px; padding: 13px 20px;
  width: 100%; max-width: 360px;
}
/* ホバー演出はマウス操作できる端末だけに限定する（(hover:hover)）。
   これを付けないと、スマホのタップで:hoverが疑似発火してgapが広がり、
   ぎりぎりの幅のボタンが2段に押し出されてしまう（実機で発覚・2026-09-05） */
@media (hover: hover) and (pointer: fine) {
  .entry-content .shop-links .shop-btn--primary:hover { gap: 12px; }
}
/* 副：Amazon / Yahoo!（.table-toggle-btn と同じ薄塗りパターン） */
.entry-content .shop-links .shop-row { display: flex; gap: 10px; width: 100%; max-width: 360px; }
.entry-content .shop-links .shop-btn--sub {
  flex: 1;
  background: var(--accent-tint); color: var(--accent);
  border: 1px solid var(--accent-tint-2);
  font-size: 14px; padding: 13px 8px;
}
@media (hover: hover) and (pointer: fine) {
  .entry-content .shop-links .shop-btn--sub:hover { background: var(--accent-tint-2); gap: 12px; }
}
/* Amazon/Yahoo!が同じ見た目すぎて「実在の別ショップ」に見えない指摘(2026-09-05)への対処。
   全面色は使わず、左端3px帯だけ各社のブランド色にして識別性を出す（パレットは崩さない） */
.entry-content .shop-links .shop-btn--amazon { border-left: 3px solid #ff9900; }
.entry-content .shop-links .shop-btn--yahoo { border-left: 3px solid #ff0033; }
.entry-content .shop-links .shop-btn--rakuten { border-left: 3px solid #bf0000; }
/* ボタン列の下の小さな注釈（リンク先への不安を払拭する目的）。
   ボタン列(360px)より広めの上限にして、PCでも極力1行に収まるようにする */
.entry-content .shop-links .note {
  margin: 0; padding: 0; text-align: center;
  font-size: 12px; color: var(--ink-soft);
  max-width: 440px;
}
/* もしもの計測用1x1透過画像。.entry-content img の共通ルール(display:block; margin:28px auto; height:auto)を
   打ち消さないと、本文写真用の余白がそのまま乗って大きな空白ができる（2026-09-05発覚） */
.entry-content .shop-links img.track-pixel {
  position: absolute; width: 1px; height: 1px; max-width: 1px;
  margin: 0; border: none; opacity: 0; pointer-events: none;
}
@media (max-width: 350px) {
  /* 実物のボタン文言なら350px超の画面はほぼ横並びで収まるため、極端に小さい画面だけの保険にする */
  .entry-content .shop-links .shop-row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .entry-content .shop-links a { transition: none; }
}

/* ---- ホームの記事一覧ページ送り（front-page.php） ---- */
.pagination {
  display: flex; justify-content: space-between; align-items: center;
  margin: 48px 0 76px; padding-top: 28px; border-top: 1px solid var(--accent-tint-2);
}
.pagination-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600;
  color: var(--accent); border-bottom: 1px solid transparent; transition: border-color .15s ease, gap .15s ease;
}
.pagination-link:hover { border-color: var(--accent); gap: 10px; }
.pagination-spacer { display: inline-block; }
.pagination-numbers { display: flex; align-items: center; gap: 4px; }
.pagination-number {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 30px; padding: 0 4px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  border-radius: 50%; transition: background-color .15s ease, color .15s ease;
}
.pagination-number:hover { color: var(--accent); background: var(--accent-tint); }
.pagination-number.is-current { color: var(--bg); background: var(--accent); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---- header ---- */
header.site { padding: 40px 0 28px; }
.site-head-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  flex-wrap: wrap; padding-bottom: 24px; border-bottom: 2px solid var(--ink);
}

.brand { display: flex; flex-direction: column; gap: 6px; }
.wordmark { font-size: 28px; font-weight: 600; letter-spacing: 0.1em; }
.wordmark a { color: inherit; }
.brand-tagline { font-size: 12.5px; color: var(--ink-faint); letter-spacing: 0.05em; }
nav.site-nav { display: flex; gap: 26px; flex-wrap: wrap; font-size: 14.5px; padding-bottom: 4px; list-style: none; margin: 0; padding-left: 0; }
nav.site-nav ul { display: flex; gap: 26px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
nav.site-nav a { color: var(--ink-soft); }
nav.site-nav a:hover { color: var(--accent); }

/* ---- hamburger menu ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex: none;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
  /* タグラインの折り返しでハンバーガーが2段目に押し出されていた問題への対策：
     ボタンをsite-head-rowの右上に固定し、ブランド部分の折り返し量に関係なく常に同じ行に見せる */
  .site-head-row { position: relative; }
  .nav-toggle { display: flex; position: absolute; top: 2px; right: 0; }
  .brand { padding-right: 52px; }
  nav.site-nav {
    display: none;
    width: 100%;
    padding-bottom: 0;
  }
  nav.site-nav.is-open { display: block; }
  nav.site-nav ul { flex-direction: column; gap: 0; }
  nav.site-nav a { display: block; padding: 14px 2px; border-bottom: 1px solid var(--line); }
}

/* ---- hero banner（トップページのみ。文字は一切焼き込まず画像はアイコンのみ。
   background-size:coverでスマホでは縮小せず中央部分だけ切り出して表示するため、アイコンの実寸サイズは崩れない） ---- */
.hero-banner {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  /* 画像アスペクト比(1920x520≒0.271)より常にわずかに高い比率(0.29)を保つことで、
     どの画面幅でも「横方向だけをトリミングする」挙動に統一しつつ、
     切り取る量を最小限にしてスマホでもアイコンがなるべく多く見えるようにする */
  height: clamp(115px, 29vw, 300px);
  position: relative;
  overflow: hidden;
}
/* 軽量パララックス用の内側レイヤー。上下に余分な高さを持たせておき、
   JS側でscrollYの一定割合だけtranslateYすることで、本文より少し遅れて動く効果を出す。
   はみ出し分は親の overflow:hidden で隠れるので、動かしても白い隙間は見えない */
.hero-banner-img {
  position: absolute;
  left: 0; right: 0; top: -12%; bottom: -12%;
  background-image: url('assets/img/hero-lab-icons.png?v=4');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  will-change: transform;
}

/* ---- mission ---- */
.mission { padding: 56px 0 8px; max-width: 640px; }
.eyebrow { font-size: 12px; letter-spacing: 0.14em; color: var(--accent); font-weight: 600; margin-bottom: 16px; }
.mission h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.55; margin: 0 0 22px; font-weight: 600; }
.mission p { color: var(--ink-soft); margin: 0 0 26px; font-size: 16px; }
.badge-row { display: flex; gap: 22px; flex-wrap: wrap; }
.badge { font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.badge::before { content: ""; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; flex: none; }

/* ---- section heading ---- */
.section-head { margin: 76px 0 32px; }
.section-head .mono { display: block; font-size: 11.5px; letter-spacing: 0.14em; color: var(--ink-faint); margin-bottom: 8px; }
.section-head h2 { font-size: 24px; font-weight: 600; margin: 0; }
.section-head a.mono { color: var(--ink-faint); }
.section-head a.mono:hover { color: var(--accent); }
.section-head h2 a { color: inherit; }
.section-head h2 a:hover { color: var(--accent); }

/* ---- icon / thumbnail blocks ---- */
.icon-block {
  aspect-ratio: 4 / 3; background: var(--accent-tint); color: var(--accent);
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
  border: 1px solid var(--line);
  width: 100%; min-width: 0;
}
.icon-block svg { width: 34%; height: 34%; }
/* サムネイル(アイキャッチ)ごとの撮影環境の違い(明るさ・色味)を軽く均して統一感を出す。
   かけすぎるとブランドの朱色まで変わってしまうので、ごく控えめな数値に留めている */
.icon-block img { width: 100%; height: 100%; object-fit: contain; min-width: 0; max-width: 100%; filter: saturate(0.94) contrast(1.03) brightness(0.99); }
.icon-block-link { display: block; width: 100%; min-width: 0; }

/* ---- featured post ---- */
.featured { display: grid; grid-template-columns: 42% minmax(0,1fr); gap: 40px; align-items: start; padding-bottom: 48px; border-bottom: 1px solid var(--line); }
@media (max-width: 720px) { .featured { grid-template-columns: minmax(0,1fr); } }
.featured .icon-block { aspect-ratio: 4 / 3; height: auto; min-height: 0; }
.featured .icon-block svg { width: 26%; height: 26%; }
.featured-body { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.cat-label { font-size: 11.5px; letter-spacing: 0.1em; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.featured-body h3 { font-family: "Yu Mincho", "游明朝", "YuMincho", "Hiragino Mincho ProN", serif; font-size: clamp(20px, 2.4vw, 27px); line-height: 1.65; font-weight: 600; margin: 0 0 14px; }
.featured-body h3 a { color: inherit; }
.featured-body > p { color: var(--ink-soft); margin: 0 0 18px; max-width: 44em; }
.byline { font-size: 13px; color: var(--ink-faint); display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }

/* ---- hanko (inspection stamp) ---- */
.header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.hanko {
  --size: 88px; width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 0 6px var(--bg), inset 0 0 0 8px var(--accent);
  transform: rotate(-8deg);
}
.hanko .kanji { font-family: "Yu Mincho", "游明朝", "YuMincho", "Hiragino Mincho ProN", serif; font-size: calc(var(--size) * 0.24); font-weight: 700; letter-spacing: 0.06em; line-height: 1; }
.hanko .en { font-size: calc(var(--size) * 0.09); letter-spacing: 0.14em; margin-top: 5px; }
.hanko--sm { --size: 44px; }
.hanko--sm .en { display: none; }
.icon-block .hanko--sm { position: absolute; top: 10px; right: 10px; }

/* ---- grid posts ---- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 40px 32px; margin-top: 48px; }
@media (max-width: 760px) { .post-grid { grid-template-columns: minmax(0,1fr); } }
.post-card { display: flex; flex-direction: column; min-width: 0; }
.post-card.pickup-card { border-top: 3px solid var(--accent); padding-top: 20px; }

/* ---- ピックアップ枠のみ：スマホ幅では縦積みではなく横スワイプのスライダーにする ---- */
@media (max-width: 760px) {
  .pickup-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    /* 左右均等にブリードさせる(-28px -28px)と、開始側の余白がまるごと無効化されるという
       ブラウザの挙動を実機で確認した。右側(peek効果用)だけブリードさせ、左側は.wrapの
       通常のpaddingにそのまま乗せることで、左の余白を確実に表示させている */
    margin: 32px -28px 0 0;
    padding: 0 0 8px 0;
  }
  .pickup-grid .post-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }
}
.post-card .icon-block { margin-bottom: 18px; }
.post-card .cat-label { margin-bottom: 10px; }
.post-card h3 { font-family: "Yu Mincho", "游明朝", "YuMincho", "Hiragino Mincho ProN", serif; font-size: 17.5px; line-height: 1.6; font-weight: 600; margin: 0 0 10px; }
.post-card h3 a { color: inherit; }
.post-card p { color: var(--ink-soft); font-size: 14px; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .byline { margin-bottom: 0; font-size: 12.5px; }

/* ---- layout ---- */
.layout { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 64px; align-items: start; margin-top: 12px; }
@media (max-width: 820px) { .layout { grid-template-columns: 1fr; } }

/* ---- deep dive article ---- */
.article { min-width: 0; }
.article .cat-label { margin-bottom: 14px; }
.article h2.title { font-family: "Yu Mincho", "游明朝", "YuMincho", "Hiragino Mincho ProN", serif; font-size: clamp(22px, 2.8vw, 30px); line-height: 1.65; font-weight: 600; margin: 0 0 18px; }
.article .byline { padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 32px; font-size: 14px; }
.article .byline b { color: var(--ink); font-weight: 600; }

table.check, .entry-content table { width: 100%; border-collapse: collapse; margin: 12px 0 32px; font-size: 15px; border: 1px solid var(--line); }
table.check th, .entry-content table th { text-align: left; font-size: 11.5px; letter-spacing: 0.1em; color: var(--ink); font-weight: 600; padding: 12px 14px; border: 0; border-bottom: 2px solid var(--accent); background: var(--accent-tint); }
table.check td, .entry-content table td { text-align: left; padding: 14px; border: 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.check tr:last-child td, .entry-content table tr:last-child td { border-bottom: 0; }
table.check td.item { font-weight: 600; white-space: nowrap; }
table.check td.crit { color: var(--ink-faint); font-size: 13.5px; }
table.check td.result { color: var(--ink-soft); }
/* 3列（評価軸／判定／詳細）の検証項目テーブルにのみ適用。nth-last-childと組み合わせて「ちょうど3列」の表だけを狙い撃ちすることで、列数の違う他の表（型番比較表など）を巻き込まないようにしている */
table.check th:nth-child(2):nth-last-child(2), .entry-content table th:nth-child(2):nth-last-child(2),
table.check td:nth-child(2):nth-last-child(2), .entry-content table td:nth-child(2):nth-last-child(2) { text-align: center; width: 64px; }
table.check td:nth-child(2):nth-last-child(2), .entry-content table td:nth-child(2):nth-last-child(2) { font-size: 20px; color: var(--accent); }
table.check td:nth-child(3):last-child, .entry-content table td:nth-child(3):last-child { color: var(--ink-soft); font-size: 14px; }

/* ---- 比較表の段階開示：tr.tr-moreを持つ表だけJSがjs-collapsibleを付与して折りたたむ。
   JS未実行時は常に全行表示のまま（アクセシビリティ上、非表示をCSS側の初期値にはしない） ---- */
.entry-content table.js-collapsible tr.tr-more { display: none; }
.entry-content table.js-collapsible.is-expanded tr.tr-more { display: table-row; }
.table-toggle-btn {
  display: block; width: 100%; margin: -20px 0 32px; padding: 12px 16px;
  background: var(--accent-tint); color: var(--accent); border: 1px solid var(--accent-tint-2);
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; cursor: pointer; font-family: inherit;
}
.table-toggle-btn:hover { background: var(--accent-tint-2); }

.article p.body-text, .entry-content p { color: var(--ink-soft); max-width: 42em; margin: 0 0 18px; }
.entry-content { clear: both; }
.entry-content strong { color: var(--accent); }
/* 本文中の太字(strong)とテキストリンク(a)が同じ朱色・下線なしで見分けがつかない問題への対策。
   リンクだけに下線を付けて区別できるようにする。カード等(post-link-card)やCTAボタン、
   矢印リンクは見た目自体がリンクだと分かるので対象外にしている */
.entry-content p a, .entry-content li a, .entry-content .note-box a, .entry-content .pros-box a, .entry-content .cons-box a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- 本文中の見出し（h2/h3）：装飾なしのブラウザ標準表示だったため強弱をルール化 ---- */
.entry-content h2 {
  font-size: 21px; font-weight: 600; line-height: 1.5; color: var(--ink);
  margin: 44px 0 20px; padding-left: 14px; border-left: 4px solid var(--accent);
}
.entry-content h3 {
  font-size: 17px; font-weight: 600; line-height: 1.5; color: var(--ink);
  margin: 32px 0 14px; padding-left: 10px; border-left: 2px solid var(--accent);
}
.entry-content h2:first-child, .entry-content h3:first-child { margin-top: 0; }

/* ---- 箇条書きの先頭を黒丸からチェックマークに変更（検証ログの「確認済み」感を強める） ---- */
.entry-content ul { list-style: none; margin: 0 0 18px; padding-left: 0; max-width: 42em; }
.entry-content ul li { position: relative; padding-left: 24px; margin-bottom: 8px; }
.entry-content ul li:last-child { margin-bottom: 0; }
.entry-content ul li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 700; }

/* ---- メリット・デメリットボックス（グループブロックに追加CSSクラス「pros-box」「cons-box」を付けて使う） ---- */
.entry-content .pros-box, .entry-content .cons-box {
  padding: 18px 22px; margin: 0 0 20px; max-width: 42em; font-size: 15px;
}
.entry-content .pros-box::before, .entry-content .cons-box::before {
  display: block; font-size: 11px; letter-spacing: 0.14em; font-weight: 600; margin-bottom: 10px;
}
.entry-content .pros-box { background: var(--accent-tint); border-left: 3px solid var(--ink); }
.entry-content .pros-box::before { content: "MERIT／メリット"; color: var(--ink); }
.entry-content .cons-box { background: var(--accent-tint-2); border-left: 3px solid var(--accent); }
.entry-content .cons-box::before { content: "DEMERIT／デメリット"; color: var(--accent); }
.entry-content .pros-box ul, .entry-content .cons-box ul { margin: 0; padding-left: 0; max-width: none; }
.entry-content .pros-box li, .entry-content .cons-box li { color: var(--ink-soft); margin-bottom: 6px; }
.entry-content .pros-box li:last-child, .entry-content .cons-box li:last-child { margin-bottom: 0; }
/* デメリット側は「確認済み」を意味するチェックマークだと語感が逆になるため、別の記号にする */
.entry-content .cons-box li::before { content: "－"; }
.entry-content .pros-box p:last-child, .entry-content .cons-box p:last-child { margin-bottom: 0; }

/* ---- 目次（H2見出しから自動生成） ---- */
.toc {
  border: 1px solid var(--line);
  background: var(--accent-tint);
  padding: 22px 26px;
  margin: 0 0 32px;
  max-width: 42em;
}
.toc-label {
  font-size: 11px; letter-spacing: 0.12em; color: var(--accent); font-weight: 600;
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
}
.toc-label::-webkit-details-marker { display: none; }
.toc-label::after { content: "－"; color: var(--accent); font-weight: 400; }
.toc:not([open]) .toc-label::after { content: "＋"; }
.toc:not([open]) .toc-label { margin-bottom: 0; }
.toc[open] .toc-label { margin-bottom: 14px; }
.toc ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 9px; }
.toc li { color: var(--ink-soft); font-size: 14.5px; }
.toc a { color: var(--ink); }
.toc a:hover { color: var(--accent); }

/* 幅の狭い画面では、無理に列を圧縮して文字が1文字ずつ折り返るより、表を横スクロールさせる方を優先する。
   短い表（自然な幅が画面に収まるもの）は今まで通り折り返し表示のまま、はみ出す表だけスクロールになる。 */
@media (max-width: 600px) {
  .entry-content .wp-block-table {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  table.check, .entry-content table {
    table-layout: auto !important;
    width: auto !important;
  }
  table.check th, .entry-content table th,
  table.check td, .entry-content table td { min-width: 110px; }
  table.check th, .entry-content table th,
  table.check td.item, .entry-content table td:first-child { white-space: nowrap; }
}
.entry-content img { max-width: min(100%, 420px); height: auto; display: block; margin: 28px auto; border: 1px solid var(--accent-tint-2); border-radius: 4px; }

/* ---- PR notice (ステマ規制対応の広告表記) ---- */
.pr-notice {
  font-size: 12.5px; color: var(--ink-faint);
  background: var(--accent-tint); border-left: 3px solid var(--accent);
  padding: 10px 14px; margin: 0 0 28px; max-width: 42em;
}

/* ---- note-box（本文中の注意点・要点を囲むコールアウト。ブロックエディタでグループブロックにclassName: note-boxを付けて使う） ---- */
.entry-content .note-box {
  background: var(--accent-tint); border-left: 3px solid var(--accent);
  padding: 16px 20px; margin: 0 0 28px; max-width: 42em;
  font-size: 15px; color: var(--ink-soft);
}
.entry-content .note-box p:last-child { margin-bottom: 0; }
.entry-content .note-box strong { color: var(--ink); }

/* ---- 内部リンクのカード化（[post_card slug="..."]ショートコード用） ---- */
.entry-content .post-link-card {
  display: flex; gap: 18px; align-items: center; max-width: 42em;
  margin: 0 0 28px; padding: 14px; border: 1px solid var(--line);
  color: inherit; transition: border-color .15s ease;
}
.entry-content .post-link-card:hover { border-color: var(--accent); }
.entry-content .post-link-card .icon-block { width: 96px; flex: none; aspect-ratio: 4 / 3; }
.entry-content .post-link-card .icon-block svg { width: 34%; height: 34%; }
.entry-content .post-link-card-body { min-width: 0; }
.entry-content .post-link-card h4 { font-size: 15.5px; font-weight: 600; margin: 4px 0 8px; line-height: 1.5; }
.entry-content .post-link-card .link-arrow { font-size: 13px; }

/* ---- aside ---- */
aside { display: flex; flex-direction: column; gap: 40px; }
.aside-box h4 { font-size: 11.5px; letter-spacing: 0.12em; color: var(--accent); font-weight: 600; margin: 0 0 16px; }
.aside-box p { font-size: 14.5px; color: var(--ink-soft); margin: 0; }
.aside-box ul { list-style: none; margin: 0; padding: 0; }
.cat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cat-list li { display: flex; justify-content: space-between; font-size: 14.5px; }
.cat-list a { color: var(--ink); }
.cat-list a:hover { color: var(--accent); }
.cat-list .count { color: var(--ink-faint); }

/* ---- search widget ---- */
.wp-block-search__inside-wrapper { display: flex; align-items: stretch; border: none; }
.wp-block-search__input,
input[type="search"] {
  font-family: inherit; font-size: 14px; color: var(--ink);
  border: 1px solid var(--line); background: var(--bg);
  padding: 10px 12px; flex: 1; min-width: 0; border-radius: 0;
}
.wp-block-search__button {
  font-size: 0; white-space: nowrap;
  background: var(--ink); color: var(--bg); border: none;
  padding: 0; width: 46px; min-width: 46px; cursor: pointer; border-radius: 0;
  position: relative;
}
.wp-block-search__button:hover { background: var(--accent); }
.wp-block-search__button::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 13px; height: 13px; margin-top: -10px; margin-left: -10px;
  border: 1.6px solid var(--bg); border-radius: 50%; box-sizing: border-box;
}
.wp-block-search__button::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 1.6px; height: 8px; margin-top: -1px; margin-left: 2px;
  background: var(--bg); transform: rotate(-45deg); transform-origin: top;
}

footer.site {
  margin-top: 96px; border-top: 1px solid var(--line); padding: 28px 0 48px;
  font-size: 12.5px; color: var(--ink-faint);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
footer.site ul.footer-links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
footer.site ul.footer-links a { color: var(--ink-faint); }
footer.site ul.footer-links a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- スクロール時のフェードイン（IntersectionObserver、JS側でjs-revealクラスを付与した時だけ有効化。
   JSが動かない場合はこのルール自体が発火せず、コンテンツは常に表示されたままになる） ---- */
.js-reveal .reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.js-reveal .reveal.is-visible { opacity: 1; transform: translateY(0); }
