/*
Theme Name: Michi Blog
Theme URI: https://michi-blog.com
Author: 合同会社道 / 中澤道雅
Description: みちブログ専用のアフィリエイト・SEO特化テーマ。目次・構造化データ・PR表記・商品ボックス・広告枠を内蔵し、プラグインを増やさずに収益とCore Web Vitalsを両立します。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: michi
Tags: blog, affiliate, seo, japanese, two-columns, custom-colors
*/

/* =========================================================
   1. デザイントークン
   ========================================================= */
:root {
  /* ブランド：合同会社道のディープティール系 */
  --c-brand: #0d2b2e;
  --c-brand-2: #1a4a4f;
  --c-accent: #0f8a7e;
  --c-accent-soft: #e3f2ef;

  --c-text: #1b2a2c;
  --c-text-sub: #5c6b6d;
  --c-text-weak: #86918f;

  --c-bg: #f2f5f3;
  --c-surface: #ffffff;
  --c-surface-2: #f7faf8;
  --c-border: #dce5e2;
  --c-border-strong: #c3d1cd;

  --c-marker: #ffe27a;
  --c-gold: #c9a227;
  --c-amazon: #ff9900;
  --c-amazon-dark: #e88a00;
  --c-rakuten: #bf0000;
  --c-rakuten-dark: #a30000;
  --c-alert: #d64545;

  --shadow-1: 0 1px 2px rgba(13, 43, 46, .06), 0 2px 8px rgba(13, 43, 46, .05);
  --shadow-2: 0 2px 6px rgba(13, 43, 46, .07), 0 12px 28px rgba(13, 43, 46, .08);
  --shadow-cta: 0 4px 0 rgba(0, 0, 0, .18);

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;

  --w-content: 1180px;
  --w-article: 720px;
  --gap: 32px;

  --font-jp: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
             "Noto Sans JP", "BIZ UDPGothic", Meiryo, sans-serif;
  --font-num: "Helvetica Neue", Arial, var(--font-jp);
}

/* =========================================================
   2. ベース
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: .02em;
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
}

img, video, iframe { max-width: 100%; height: auto; }
img { vertical-align: middle; }

a { color: var(--c-accent); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-brand-2); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 3px;
}

h1, h2, h3, h4 { font-feature-settings: "palt" 1; letter-spacing: .01em; line-height: 1.5; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--c-brand); color: #fff; padding: 12px 20px; text-decoration: none;
}
.skip-link:focus { left: 8px; top: 8px; }

/* =========================================================
   3. レイアウト
   ========================================================= */
.l-container { width: min(100% - 32px, var(--w-content)); margin-inline: auto; }
.l-main { padding: 28px 0 64px; }
.l-grid { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: var(--gap); align-items: start; }
.l-grid--full { grid-template-columns: minmax(0, 1fr); }

@media (max-width: 960px) {
  .l-grid { grid-template-columns: minmax(0, 1fr); }
  .l-main { padding: 20px 0 48px; }
  .l-container { width: min(100% - 24px, var(--w-content)); }
}

/* =========================================================
   4. ヘッダー
   ========================================================= */
.site-header {
  background: var(--c-brand);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(13, 43, 46, .18);
}
.header-bar { display: flex; align-items: center; gap: 16px; height: 62px; }

.brand { display: flex; align-items: center; text-decoration: none; color: #fff; flex-shrink: 0; }
.brand:hover { color: #fff; opacity: .9; }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: .04em; }
.brand-tagline { display: block; font-size: 10px; font-weight: 400; opacity: .75; letter-spacing: .06em; }

.gnav { margin-left: auto; }
.gnav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.gnav a {
  display: block; padding: 8px 12px; border-radius: var(--r-s);
  color: rgba(255, 255, 255, .92); text-decoration: none; font-size: 14px; font-weight: 500;
}
.gnav a:hover, .gnav .current-menu-item > a { background: rgba(255, 255, 255, .14); color: #fff; }

.header-search { flex-shrink: 0; }
.header-search button {
  width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .12); border: 0; border-radius: 50%; color: #fff;
}
.header-search button:hover { background: rgba(255, 255, 255, .22); }

.nav-toggle { display: none; }

/* モバイル：カテゴリを横スクロールバーに */
.cat-scroller { display: none; background: var(--c-brand-2); }
.cat-scroller ul {
  display: flex; gap: 8px; list-style: none; margin: 0; padding: 8px 12px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.cat-scroller ul::-webkit-scrollbar { display: none; }
.cat-scroller a {
  display: block; white-space: nowrap; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 13px; text-decoration: none;
}

@media (max-width: 860px) {
  .gnav { display: none; }
  .cat-scroller { display: block; }
  .header-bar { height: 56px; }
  .brand-name { font-size: 16px; }
}

/* 検索オーバーレイ */
.search-panel {
  display: none; background: var(--c-brand-2); padding: 14px 0;
}
.search-panel.is-open { display: block; }
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
  flex: 1; padding: 12px 14px; border: 0; border-radius: var(--r-s); font-size: 16px; font-family: inherit;
}
.search-form button[type="submit"] {
  padding: 12px 22px; border: 0; border-radius: var(--r-s); cursor: pointer;
  background: var(--c-accent); color: #fff; font-weight: 700; font-family: inherit;
}

/* =========================================================
   5. パンくず
   ========================================================= */
.breadcrumb { padding: 12px 0 0; font-size: 12px; color: var(--c-text-sub); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumb li::after { content: "›"; margin-left: 6px; color: var(--c-text-weak); }
.breadcrumb li:last-child::after { content: none; }
.breadcrumb a { color: var(--c-text-sub); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-accent); text-decoration: underline; }

/* =========================================================
   6. カード / 記事一覧
   ========================================================= */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.section-title { margin: 0; font-size: 20px; font-weight: 700; color: var(--c-brand); }
.section-more { font-size: 13px; text-decoration: none; }
.section-more:hover { text-decoration: underline; }

.card-list { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-list--1 { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 600px) { .card-list { grid-template-columns: minmax(0, 1fr); gap: 14px; } }

.card {
  background: var(--c-surface); border-radius: var(--r-m); overflow: hidden;
  box-shadow: var(--shadow-1); transition: box-shadow .18s ease, transform .18s ease;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-2); }
.card-media { position: relative; }
.card-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--c-surface-2); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-cat {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(13, 43, 46, .86); color: #fff; text-decoration: none; backdrop-filter: blur(2px);
}
.card-cat:hover { background: var(--c-accent); color: #fff; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.6; }
.card-title a { color: var(--c-text); text-decoration: none; }
.card-title a:hover { color: var(--c-accent); }
.card-excerpt { margin: 0; font-size: 13px; line-height: 1.8; color: var(--c-text-sub); }
.card-meta { margin-top: auto; font-family: var(--font-num); font-size: 12px; color: var(--c-text-weak); display: flex; gap: 10px; }

/* アイキャッチ未設定時のフォールバック */
.thumb-fallback {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--fb-a, #24413f), var(--fb-b, #33605b));
}

/* 横並びカード（サイドバー・関連記事） */
.card-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--c-border); }
.card-row:last-child { border-bottom: 0; }
.card-row .thumb { flex: 0 0 96px; aspect-ratio: 16 / 10; border-radius: var(--r-s); overflow: hidden; background: var(--c-surface-2); }
.card-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-row .title { margin: 0; font-size: 13px; line-height: 1.65; font-weight: 600; }
.card-row .title a { color: var(--c-text); text-decoration: none; }
.card-row .title a:hover { color: var(--c-accent); }
.card-row .meta { margin: 4px 0 0; font-family: var(--font-num); font-size: 11px; color: var(--c-text-weak); }
.card-row .rank {
  flex: 0 0 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  background: var(--c-brand); color: #fff; font-family: var(--font-num); font-size: 12px; font-weight: 700;
}
.card-row .rank[data-rank="1"] { background: var(--c-gold); }
.card-row .rank[data-rank="2"] { background: #9aa7a5; }
.card-row .rank[data-rank="3"] { background: #b08355; }

/* ピックアップ（トップ最上部） */
.pickup { background: var(--c-surface); border-radius: var(--r-l); box-shadow: var(--shadow-2); overflow: hidden; }
.pickup-inner { display: grid; grid-template-columns: 1.15fr 1fr; }
.pickup-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--c-surface-2); }
.pickup-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pickup-body { padding: 28px 32px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.pickup-label {
  align-self: flex-start; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--c-accent-soft); color: var(--c-brand);
}
.pickup-title { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.55; }
.pickup-title a { color: var(--c-text); text-decoration: none; }
.pickup-title a:hover { color: var(--c-accent); }
.pickup-excerpt { margin: 0; font-size: 14px; color: var(--c-text-sub); }
.pickup-meta { font-family: var(--font-num); font-size: 12px; color: var(--c-text-weak); }
@media (max-width: 800px) {
  .pickup-inner { grid-template-columns: minmax(0, 1fr); }
  .pickup-body { padding: 18px 18px 22px; }
  .pickup-title { font-size: 19px; }
}

/* カテゴリタイル */
.cat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 700px) { .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.cat-tile {
  display: block; padding: 18px 16px; border-radius: var(--r-m); text-decoration: none;
  background: var(--c-surface); box-shadow: var(--shadow-1); transition: box-shadow .18s ease;
}
.cat-tile:hover { box-shadow: var(--shadow-2); }
.cat-tile .name { display: block; font-size: 15px; font-weight: 700; color: var(--c-text); }
.cat-tile .desc { display: block; margin-top: 4px; font-size: 12px; color: var(--c-text-sub); line-height: 1.7; }
.cat-tile .count { display: block; margin-top: 8px; font-family: var(--font-num); font-size: 11px; color: var(--c-accent); font-weight: 700; }

/* =========================================================
   7. 記事本文
   ========================================================= */
.article {
  background: var(--c-surface); border-radius: var(--r-l); box-shadow: var(--shadow-1);
  padding: 32px 40px 40px;
}
@media (max-width: 700px) { .article { padding: 20px 18px 28px; border-radius: var(--r-m); } }

.article-head { margin-bottom: 20px; }
.article-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.article-cats a {
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; text-decoration: none;
  background: var(--c-accent-soft); color: var(--c-brand);
}
.article-cats a:hover { background: var(--c-accent); color: #fff; }
.article-title { margin: 0 0 12px; font-size: 30px; font-weight: 700; line-height: 1.45; }
@media (max-width: 700px) { .article-title { font-size: 22px; } }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; font-family: var(--font-num); font-size: 13px; color: var(--c-text-weak); }
.article-thumb { margin: 18px 0; border-radius: var(--r-m); overflow: hidden; }

/* PR表記（ステマ規制対応） */
.pr-notice {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 0 0 20px; padding: 10px 14px; border-radius: var(--r-s);
  background: var(--c-surface-2); color: var(--c-text-sub); font-size: 12px; line-height: 1.7;
}
.pr-notice .tag {
  flex-shrink: 0; padding: 1px 8px; border-radius: 4px; font-weight: 700;
  background: var(--c-text-sub); color: #fff; font-size: 11px;
}

/* 本文タイポグラフィ */
.entry-content { font-size: 16.5px; line-height: 2.0; }
.entry-content > * + * { margin-top: 1.4em; }
.entry-content p { margin: 0; }

.entry-content h2 {
  margin: 2.4em 0 1em; padding: 14px 18px; border-radius: var(--r-s);
  background: var(--c-brand); color: #fff; font-size: 21px; font-weight: 700;
}
.entry-content h3 {
  margin: 2em 0 .9em; padding: 0 0 8px; border-bottom: 2px solid var(--c-border-strong);
  font-size: 18.5px; font-weight: 700; color: var(--c-brand);
}
.entry-content h4 { margin: 1.8em 0 .8em; font-size: 16.5px; font-weight: 700; color: var(--c-brand-2); }
@media (max-width: 700px) {
  .entry-content { font-size: 16px; line-height: 1.95; }
  .entry-content h2 { font-size: 18px; padding: 12px 14px; }
  .entry-content h3 { font-size: 16.5px; }
}

.entry-content a { font-weight: 500; }
.entry-content strong { font-weight: 700; }
.entry-content mark, .entry-content .marker {
  background: linear-gradient(transparent 62%, var(--c-marker) 62%); padding: 0 2px;
}
.entry-content ul, .entry-content ol { padding-left: 1.5em; }
.entry-content li + li { margin-top: .5em; }
.entry-content ul li::marker { color: var(--c-accent); }
.entry-content blockquote {
  margin: 1.6em 0; padding: 16px 20px; border-radius: var(--r-s);
  background: var(--c-surface-2); color: var(--c-text-sub); font-size: 15px;
}
.entry-content blockquote p { margin: 0; }
.entry-content blockquote cite { display: block; margin-top: 8px; font-size: 12px; font-style: normal; color: var(--c-text-weak); }
.entry-content img { border-radius: var(--r-s); }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { margin-top: 6px; font-size: 12px; color: var(--c-text-weak); text-align: center; }
.entry-content hr { margin: 2.4em 0; border: 0; border-top: 1px solid var(--c-border); }
.entry-content code {
  padding: 2px 6px; border-radius: 4px; background: var(--c-surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em;
}
.entry-content pre {
  padding: 16px; border-radius: var(--r-s); overflow-x: auto;
  background: var(--c-brand); color: #e8f2f0; font-size: 13px; line-height: 1.7;
}
.entry-content pre code { background: none; color: inherit; padding: 0; }

/* テーブル（比較表） */
.entry-content .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.6em 0; }
.entry-content table {
  width: 100%; border-collapse: collapse; font-size: 14px; background: var(--c-surface);
  font-variant-numeric: tabular-nums;
}
.entry-content th, .entry-content td { padding: 10px 12px; border: 1px solid var(--c-border); text-align: left; vertical-align: top; }
.entry-content thead th { background: var(--c-brand); color: #fff; font-weight: 700; white-space: nowrap; }
.entry-content tbody th { background: var(--c-surface-2); font-weight: 700; white-space: nowrap; }
.entry-content tbody tr:nth-child(even) td { background: #fbfdfc; }

/* =========================================================
   8. 目次
   ========================================================= */
.toc {
  margin: 24px 0; padding: 18px 20px; border-radius: var(--r-m);
  background: var(--c-surface-2); box-shadow: var(--shadow-1);
}
.toc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toc-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--c-brand); }
.toc-toggle {
  background: none; border: 1px solid var(--c-border-strong); border-radius: 999px;
  padding: 3px 12px; font-size: 12px; color: var(--c-text-sub); cursor: pointer; font-family: inherit;
}
.toc ol { margin: 12px 0 0; padding-left: 1.4em; font-size: 14px; }
.toc ol ol { margin: 6px 0 0; font-size: 13px; color: var(--c-text-sub); }
.toc li { margin: 6px 0; }
.toc a { color: var(--c-text); text-decoration: none; }
.toc a:hover { color: var(--c-accent); text-decoration: underline; }
.toc[data-collapsed="true"] > ol { display: none; }

/* =========================================================
   9. 商品ボックス・CTA（収益パーツ）
   ========================================================= */
.aff-box {
  margin: 2em 0; padding: 20px; border-radius: var(--r-m);
  background: var(--c-surface); box-shadow: var(--shadow-2);
}
.aff-box__inner { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 600px) { .aff-box__inner { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.aff-box__img { border-radius: var(--r-s); overflow: hidden; background: var(--c-surface-2); }
.aff-box__img img { width: 100%; height: auto; display: block; }
.aff-box__name { margin: 0 0 8px; font-size: 17px; font-weight: 700; line-height: 1.6; }
.aff-box__desc { margin: 0 0 10px; font-size: 14px; color: var(--c-text-sub); line-height: 1.8; }
.aff-box__points { margin: 0 0 12px; padding: 0; list-style: none; font-size: 13.5px; }
.aff-box__points li { position: relative; padding-left: 22px; margin: 5px 0; }
.aff-box__points li::before {
  content: ""; position: absolute; left: 4px; top: .55em; width: 6px; height: 10px;
  border-right: 2px solid var(--c-accent); border-bottom: 2px solid var(--c-accent); transform: rotate(45deg);
}
.aff-box__price { font-family: var(--font-num); font-size: 13px; color: var(--c-text-weak); margin-bottom: 12px; }
.aff-box__btns { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.btn-aff {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 18px; border-radius: var(--r-s); text-decoration: none;
  font-size: 15px; font-weight: 700; color: #fff; text-align: center;
  box-shadow: var(--shadow-cta); transition: transform .12s ease, box-shadow .12s ease;
}
.btn-aff:hover { color: #fff; transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.btn-aff--amazon { background: var(--c-amazon); }
.btn-aff--amazon:hover { background: var(--c-amazon-dark); }
.btn-aff--rakuten { background: var(--c-rakuten); }
.btn-aff--rakuten:hover { background: var(--c-rakuten-dark); }
.btn-aff--yahoo { background: #ff0033; }
.btn-aff--official { background: var(--c-brand); }
.btn-aff--official:hover { background: var(--c-brand-2); }

/* 既存記事のインラインstyle付きボタンも最低限整える */
.entry-content p > a[style*="background"] { box-shadow: var(--shadow-cta); }

/* ランキング見出し（順位＝連番なので数字を使う） */
.rank-box { margin: 2em 0; border-radius: var(--r-m); background: var(--c-surface); box-shadow: var(--shadow-2); overflow: hidden; }
.rank-box__head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: var(--c-brand); color: #fff; }
.rank-box__num { font-family: var(--font-num); font-size: 22px; font-weight: 700; line-height: 1; }
.rank-box__label { font-size: 15px; font-weight: 700; }
.rank-box--1 .rank-box__head { background: linear-gradient(120deg, #a8871a, var(--c-gold)); }
.rank-box__body { padding: 18px; }

/* 評価スター */
.rating { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-num); font-size: 13px; color: var(--c-text-sub); }
.rating__stars { color: var(--c-gold); letter-spacing: .1em; }

/* メリット・デメリット */
.pros-cons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 1.8em 0; }
@media (max-width: 600px) { .pros-cons { grid-template-columns: minmax(0, 1fr); } }
.pros, .cons { padding: 16px 18px; border-radius: var(--r-m); box-shadow: var(--shadow-1); background: var(--c-surface); }
.pros h4, .cons h4 { margin: 0 0 8px; font-size: 15px; }
.pros h4 { color: var(--c-accent); }
.cons h4 { color: var(--c-alert); }
.pros ul, .cons ul { margin: 0; padding-left: 1.3em; font-size: 14px; }

/* 注意・ポイントボックス */
.note-box { margin: 1.8em 0; padding: 16px 18px; border-radius: var(--r-m); background: var(--c-accent-soft); font-size: 14.5px; }
.note-box__title { display: block; margin-bottom: 6px; font-weight: 700; color: var(--c-brand); }
.note-box--alert { background: #fdeeee; }
.note-box--alert .note-box__title { color: var(--c-alert); }

/* 吹き出し */
.balloon { display: flex; gap: 12px; margin: 1.8em 0; align-items: flex-start; }
.balloon__icon { flex: 0 0 56px; }
.balloon__icon img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.balloon__name { display: block; text-align: center; font-size: 11px; color: var(--c-text-weak); margin-top: 4px; }
.balloon__text {
  position: relative; padding: 14px 16px; border-radius: var(--r-m);
  background: var(--c-surface-2); font-size: 14.5px; line-height: 1.85;
}
.balloon__text::before {
  content: ""; position: absolute; left: -7px; top: 18px; width: 14px; height: 14px;
  background: var(--c-surface-2); transform: rotate(45deg);
}
.balloon__text p { margin: 0; }
.balloon__text p + p { margin-top: .8em; }

/* =========================================================
   10. 著者ボックス・関連記事・シェア
   ========================================================= */
.author-box {
  margin: 36px 0 0; padding: 22px; border-radius: var(--r-m);
  background: var(--c-surface-2); box-shadow: var(--shadow-1);
}
.author-box__top { display: flex; gap: 16px; align-items: center; }
.author-box__avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box__name { margin: 0; font-size: 16px; font-weight: 700; }
.author-box__role { margin: 2px 0 0; font-size: 12px; color: var(--c-text-sub); }
.author-box__bio { margin: 12px 0 0; font-size: 13.5px; line-height: 1.85; color: var(--c-text-sub); }
.author-box__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: 13px; }

.share-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.share-list a {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px;
  background: var(--c-surface-2); color: var(--c-text-sub); font-size: 13px; text-decoration: none; font-weight: 600;
}
.share-list a:hover { background: var(--c-brand); color: #fff; }

.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
@media (max-width: 600px) { .post-nav { grid-template-columns: minmax(0, 1fr); } }
.post-nav a {
  display: block; padding: 14px 16px; border-radius: var(--r-m); background: var(--c-surface);
  box-shadow: var(--shadow-1); text-decoration: none; font-size: 13.5px; font-weight: 600; color: var(--c-text);
}
.post-nav a:hover { box-shadow: var(--shadow-2); color: var(--c-accent); }
.post-nav .label { display: block; font-size: 11px; color: var(--c-text-weak); margin-bottom: 4px; font-family: var(--font-num); }
.post-nav .next { text-align: right; }

/* =========================================================
   11. サイドバー
   ========================================================= */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.widget { background: var(--c-surface); border-radius: var(--r-m); box-shadow: var(--shadow-1); padding: 18px 18px 20px; }
.widget-title { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--c-brand); }
.widget ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.widget li { padding: 7px 0; border-bottom: 1px solid var(--c-border); }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--c-text); text-decoration: none; }
.widget a:hover { color: var(--c-accent); }
.widget-sticky { position: sticky; top: 78px; }

/* 広告枠 */
.ad-slot { margin: 28px 0; text-align: center; }
.ad-slot__label { display: block; font-size: 10px; color: var(--c-text-weak); margin-bottom: 6px; letter-spacing: .1em; }
.ad-slot ins, .ad-slot iframe { max-width: 100%; }
.widget--ad { padding: 14px; }

/* =========================================================
   12. ページネーション・フッター・404
   ========================================================= */
.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers {
  min-width: 40px; height: 40px; padding: 0 12px; display: grid; place-items: center;
  border-radius: var(--r-s); background: var(--c-surface); box-shadow: var(--shadow-1);
  color: var(--c-text); text-decoration: none; font-family: var(--font-num); font-size: 14px;
}
.pagination .page-numbers:hover { color: var(--c-accent); }
.pagination .page-numbers.current { background: var(--c-brand); color: #fff; }

.archive-head { margin-bottom: 22px; }
.archive-title { margin: 0 0 6px; font-size: 24px; font-weight: 700; color: var(--c-brand); }
.archive-desc { margin: 0; font-size: 14px; color: var(--c-text-sub); line-height: 1.9; }
.archive-count { font-family: var(--font-num); font-size: 12px; color: var(--c-text-weak); }

.site-footer { background: var(--c-brand); color: rgba(255, 255, 255, .82); padding: 40px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; } }
.footer-about { font-size: 13px; line-height: 1.9; }
.footer-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.site-footer li { margin: 7px 0; }
.site-footer a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-disclosure {
  margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: 11.5px; line-height: 1.8; color: rgba(255, 255, 255, .62);
}
.footer-copy { margin-top: 10px; font-family: var(--font-num); font-size: 11px; color: rgba(255, 255, 255, .55); }

.error-404 { background: var(--c-surface); border-radius: var(--r-l); box-shadow: var(--shadow-1); padding: 48px 32px; text-align: center; }
.error-404 h1 { margin: 0 0 10px; font-size: 24px; color: var(--c-brand); }
.error-404 p { margin: 0 0 24px; color: var(--c-text-sub); font-size: 14px; }

/* 追従CTA（モバイル） */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: none;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); box-shadow: 0 -2px 12px rgba(13, 43, 46, .12);
}
.mobile-cta.is-visible { display: block; }
@media (min-width: 861px) { .mobile-cta { display: none !important; } }
