/*
Theme Name: Maguro Diary
Theme URI: https://travel-maguro.com
Author: Maguro
Description: 旅行雑誌風エディトリアルブログテーマ
Version: 1.0.0
License: GPL v2 or later
Text Domain: maguro-diary
Template: cocoon-master
*/

/* ── リセット ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  background: #ede4d6;
  color: #1a1a18;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; }

/* ── テーマトークン ── */
:root {
  --accent: #8B6F4E;
  --bg: #ede4d6;
  --bg-alt: #e5d9c8;
  --ink: #1a1a18;
  --muted: #888;
  --line: #d9cfc2;
  --serif: 'Noto Serif JP', serif;
  --display: 'Playfair Display', serif;
  --container: 1200px;
}

/* ── レイアウト ── */
.site-wrap { max-width: var(--container); margin: 0 auto; background: var(--bg); }
.section-pad { padding: 40px; }

/* ── ヘッダー ── */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-logo { display: flex; align-items: baseline; gap: 12px; }
.site-logo .name {
  font-family: var(--serif);
  font-size: 22px; font-weight: 700;
  letter-spacing: 0.04em;
}
.site-logo .sub {
  font-family: var(--display);
  font-style: italic;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.15em;
}
.site-nav ul { display: flex; gap: 28px; }
.site-nav a {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: #555;
  position: relative;
  padding: 4px 0;
  transition: color 0.18s;
}
.site-nav a:hover, .site-nav .current-menu-item a { color: var(--accent); }
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width 0.18s;
}
.site-nav a:hover::after, .site-nav .current-menu-item a::after { width: 100%; }

/* ── ハンバーガーボタン ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px; height: 20px;
  cursor: pointer;
  padding: 0; background: none; border: 0;
  z-index: 10001;
}
.hamburger span {
  display: block;
  width: 100%; height: 2px;
  background: var(--ink);
  transition: all 0.3s ease;
  transform-origin: center;
}
.hamburger.is-active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ── 全画面ナビ ── */
.fullscreen-nav {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.fullscreen-nav.is-open { opacity: 1; visibility: visible; }
.fullscreen-nav__close {
  position: absolute; top: 24px; right: 24px;
  font-size: 24px; color: var(--muted);
  cursor: pointer; background: none; border: 0;
  transition: color 0.18s;
}
.fullscreen-nav__close:hover { color: var(--accent); }
.fullscreen-nav__menu { text-align: center; }
.fullscreen-nav__list { list-style: none; padding: 0; margin: 0; }
.fullscreen-nav__list li { margin: 0; }
.fullscreen-nav__list a {
  display: block;
  font-family: var(--serif);
  font-size: 28px; font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--ink);
  padding: 16px 40px;
  transition: color 0.18s;
  text-decoration: none;
}
.fullscreen-nav__list a:hover { color: var(--accent); }

/* ── ヒーロースライドショー ── */
.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.hero-tabs {
  position: absolute; top: 24px; left: 40px; right: 40px;
  display: flex; gap: 0;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  z-index: 3;
}
.hero-tabs button {
  padding: 10px 20px;
  font-size: 11px; letter-spacing: 0.15em;
  color: rgba(255,255,255,0.7);
  border-bottom: 2px solid transparent;
  transition: all 0.18s;
}
.hero-tabs button.is-active {
  color: #fff;
  border-bottom-color: var(--accent);
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 0.7s ease;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide .bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.hero-slide .bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%);
}
.hero-slide .text {
  position: absolute; bottom: 60px; left: 40px; right: 40px;
  color: #fff; z-index: 2;
}
.hero-slide .label {
  font-family: var(--display); font-style: italic;
  font-size: 12px; letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 12px;
}
.hero-slide h2 {
  font-family: var(--serif);
  font-size: 32px; font-weight: 700;
  line-height: 1.4;
  max-width: 720px;
}
.hero-slide .meta {
  margin-top: 12px;
  font-size: 11px; letter-spacing: 0.1em;
  opacity: 0.8;
}
.hero-nav {
  position: absolute; bottom: 24px; right: 40px;
  display: flex; align-items: center; gap: 14px;
  z-index: 3;
}
.hero-dots { display: flex; gap: 6px; }
.hero-dots button {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: background 0.18s;
}
.hero-dots button.is-active { background: #fff; }
.hero-arrows { display: flex; gap: 6px; }
.hero-arrows button {
  width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff; font-size: 14px;
  transition: all 0.18s;
}
.hero-arrows button:hover { background: rgba(255,255,255,0.15); }

/* ── セクションヘッダー ── */
.section-head {
  display: flex; align-items: center; gap: 12px;
  border-bottom: none;
  padding-bottom: 12px;
  margin-bottom: 32px;
  justify-content: center;
  position: relative;
}
.section-head::after {
  content: "";
  position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 48px; height: 2px;
  background: var(--accent);
}
.section-head .ja {
  font-family: var(--serif);
  font-size: 16px; font-weight: 700;
  color: var(--ink);
}
.section-head .en {
  font-family: var(--display); font-style: italic;
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--muted);
}

/* ── カテゴリーカード ── */
.category-cards {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 0 40px 40px;
}
.cat-card {
  position: relative;
  border: 1px solid var(--line);
  transition: border-color 0.18s, transform 0.18s;
  cursor: pointer;
  background: #fff;
  display: block;
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cat-card .ph { height: 147px; background: var(--bg-alt); position: relative; overflow: hidden; }
.cat-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.cat-card .ph::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.04), rgba(0,0,0,0.08));
}
.cat-card .body { padding: 14px 16px 18px; }
.cat-card .en {
  font-size: 9px; letter-spacing: 0.28em; color: var(--accent);
  text-transform: uppercase; margin-bottom: 6px;
}
.cat-card .name {
  font-family: var(--serif);
  font-size: 18px; font-weight: 700;
  margin-bottom: 4px;
}
.cat-card .count { font-size: 10px; color: #bbb; letter-spacing: 0.1em; }
.cat-card .accent-line {
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--accent);
  transition: width 0.22s;
}
.cat-card:hover .accent-line { width: 100%; }

/* ── 記事リスト＋サイドバー ── */
.main-grid {
  display: grid; grid-template-columns: 1fr 280px;
  padding: 0 40px 60px;
  gap: 40px;
}
.article-list .item {
  display: grid; grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.article-list .item:first-child { padding-top: 0; }
.article-list .thumb {
  width: 240px;
  min-width: 240px;
  height: 135px;
  flex-shrink: 0;
  background: var(--bg-alt);
  overflow: hidden;
  border-radius: 2px;
}
.article-list .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block; }
.article-list .thumb svg { width: 100%; height: 100%; }
.article-list .meta {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 8px;
  font-size: 10px; letter-spacing: 0.1em;
}
.article-list .badge {
  padding: 2px 8px;
  background: var(--accent); color: #fff;
  letter-spacing: 0.15em;
  font-size: 10px;
}
.article-list .date { color: #bbb; }
.article-list h3 {
  font-family: var(--serif);
  font-size: 18px; font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}
.article-list h3 a:hover { color: var(--accent); }
.article-list .excerpt {
  font-size: 12px; color: #777;
  line-height: 1.7;
}

/* ── サイドバー ── */
.sidebar { font-size: 12px; }
.sidebar .widget { margin-bottom: 32px; }
.sidebar .widget-title {
  font-family: var(--serif);
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 6px; margin-bottom: 12px;
}
.sidebar a:hover { color: var(--accent); }
.sidebar ul li {
  padding: 8px 0;
  border-bottom: 1px solid #d9cfc2;
  display: flex; justify-content: space-between; align-items: center;
}
.sidebar-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: block; margin: 0 auto 10px;
}

/* ── カテゴリーヒーロー ── */
.category-hero-wrap {
  position: relative;
  height: 260px;
  overflow: hidden;
}
.category-hero-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* ── 旅行ページ：日本地図 ── */
.japan-map-section {
  padding: 40px;
  border-bottom: 1px solid var(--line);
  background: var(--bg) !important;
}

/* ── Cocoon白背景を全ページでベージュに統一 ── */
#wrapper,
#main,
#main-container,
#contents,
#content,
.entry-content,
.post-content,
.singular-entry-content {
  background: var(--bg) !important;
  background-color: var(--bg) !important;
}
.site-wrap,
.main-grid,
.food-filter,
.japan-map-section {
  background: var(--bg) !important;
}
.japan-map-grid {
  display: grid; grid-template-columns: 1fr 280px;
  gap: 40px; align-items: start;
}
.japan-tooltip {
  position: absolute; pointer-events: none;
  background: rgba(20,18,15,0.88); color: #fff;
  padding: 8px 12px; font-size: 11px;
  display: none; z-index: 10; border-radius: 3px;
}
.visited-list .legend { display: flex; gap: 16px; margin-bottom: 20px; }
.visited-list .legend .sw { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.visited-list .legend .sw i { width: 12px; height: 12px; border-radius: 2px; display: block; }
.visited-list ul li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.visited-list .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.visited-list .pref { font-family: var(--serif); font-size: 13px; font-weight: 700; }
.visited-list .ct { font-size: 9px; padding: 2px 7px; background: var(--accent); color: #fff; }
.visited-list .post {
  font-size: 11px; color: var(--muted);
  padding-left: 8px; border-left: 2px solid var(--accent);
  margin-top: 3px; line-height: 1.5;
}

/* ── ごはんページ：ジャンルフィルター ── */
.food-filter { padding: 40px; border-bottom: 1px solid var(--line); }
.genre-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; justify-content: center; }
.genre-tabs button {
  padding: 7px 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 11px; letter-spacing: 0.1em;
  transition: all 0.18s;
  cursor: pointer;
}
.genre-tabs button.is-active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.food-filter p[style*="letter-spacing"] { text-align: center; }

.shop-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.shop-card {
  background: #fff; border: 1px solid var(--line);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.shop-card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(0,0,0,0.07); }
.shop-card .bar { height: 3px; background: var(--accent); }
.shop-card .pad { padding: 16px 18px 18px; }
.shop-card .meta { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.shop-card .genre {
  font-size: 9px; padding: 2px 8px;
  background: var(--bg-alt); color: var(--accent);
  letter-spacing: 0.1em;
}
.shop-card .area { font-size: 10px; color: #bbb; }
.shop-card .name {
  font-family: var(--serif); font-size: 14px; font-weight: 700;
  margin-bottom: 8px; line-height: 1.4;
}
.shop-card .name a:hover { color: var(--accent); }
.shop-card .excerpt {
  font-size: 11px; color: var(--muted);
  padding-left: 8px; border-left: 2px solid var(--accent);
  line-height: 1.6;
}
.shop-card .stars { display: flex; gap: 2px; margin-top: 10px; font-size: 10px; }
.shop-card .stars .on { color: var(--accent); }
.shop-card .stars .off { color: var(--line); }

/* ── ロードバイクページ：ライド記録 ── */
.ride-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 36px 40px; border-bottom: 1px solid var(--line);
}
.ride-stats .stat {
  text-align: center; padding: 0 20px;
  border-right: 1px solid var(--line);
}
.ride-stats .stat:last-child { border-right: 0; }
.ride-stats .num {
  font-family: var(--display); font-style: italic;
  font-size: 32px; font-weight: 700;
  color: var(--accent); line-height: 1.1; margin-bottom: 4px;
}
.ride-stats .lbl { font-family: var(--serif); font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.ride-stats .sub { font-size: 9px; letter-spacing: 0.15em; color: #bbb; }
.tag-tabs { display: flex; gap: 8px; flex-wrap: wrap; padding: 24px 40px; }
.tag-tabs button {
  padding: 5px 14px;
  border: 1px solid var(--line);
  font-size: 10px; letter-spacing: 0.1em; color: var(--muted);
  transition: all 0.18s; cursor: pointer;
}
.tag-tabs button.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.ride-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; padding: 0 40px 40px; }
.ride-card {
  background: #fff; border: 1px solid var(--line); padding: 20px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.ride-card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.ride-card .head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.ride-card .tags { display: flex; gap: 6px; margin-bottom: 6px; }
.ride-card .tag {
  font-size: 9px; padding: 2px 7px;
  background: var(--bg-alt); color: var(--accent); letter-spacing: 0.1em;
}
.ride-card .title { font-family: var(--serif); font-size: 15px; font-weight: 700; }
.ride-card .title a:hover { color: var(--accent); }
.ride-card .date { font-size: 10px; color: #bbb; }
.ride-card .elev-graph { margin-bottom: 14px; height: 50px; overflow: hidden; }
.ride-card .stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 12px; }
.ride-card .stats > div { text-align: center; padding: 8px 4px; border-right: 1px solid var(--line); }
.ride-card .stats > div:last-child { border-right: 0; }
.ride-card .stats .v { font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--accent); line-height: 1; }
.ride-card .stats .u { font-size: 10px; margin-left: 1px; }
.ride-card .stats .l { font-size: 9px; color: #bbb; margin-top: 3px; letter-spacing: 0.1em; }
.ride-card .excerpt {
  font-size: 10px; color: #bbb;
  padding-top: 10px; border-top: 1px solid var(--line);
  padding-left: 6px; border-left: 2px solid var(--accent);
}

/* ── ページネーション ── */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 40px 0; }
.pagination .page-numbers {
  padding: 8px 14px; border: 1px solid var(--line); font-size: 12px; transition: all 0.18s;
}
.pagination .current,
.pagination .page-numbers:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── 記事詳細ページ：基本構造 ── */
.single-post { padding: 0; max-width: 100%; }
.single-post .post-meta { display: flex; gap: 12px; margin-bottom: 16px; font-size: 11px; align-items: center; }
.single-post .featured { margin-bottom: 32px; }

/* ── 記事タイトル (H1) ── */
.single-post h1,
article h1 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  color: var(--ink);
}

/* ── 本文基本 ── */
.content {
  font-size: 15px;
  line-height: 2.0;
  color: #333;
}
.content p { margin-bottom: 1.6em; }

/* ── H2：左太ボーダー＋薄ベージュ背景 ── */
.content h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
  margin: 2.4em 0 1em;
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  background: #f0e9df;
  color: var(--ink);
  border-radius: 0 4px 4px 0;
}

/* ── H3：左細ボーダーのみ ── */
.content h3 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.5;
  margin: 2em 0 0.8em;
  padding: 4px 0 4px 12px;
  border-left: 3px solid var(--accent);
  color: var(--ink);
}

/* ── H4：小見出し ── */
.content h4 {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin: 1.6em 0 0.6em;
  color: var(--accent);
}

/* ── 引用ブロック ── */
.content blockquote {
  border-left: 3px solid var(--accent);
  background: #f0e9df;
  padding: 14px 20px;
  margin: 1.6em 0;
  color: #666;
  font-style: italic;
  line-height: 1.8;
  border-radius: 0 4px 4px 0;
}

/* ── リスト ── */
.content ul,
.content ol {
  margin: 1.2em 0 1.6em 1.2em;
  line-height: 2.0;
}
.content ul { list-style: none; padding-left: 0; }
.content ul li {
  padding-left: 1.4em;
  position: relative;
  margin-bottom: 0.4em;
}
.content ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.75em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.content ol { list-style: decimal; padding-left: 1.4em; }
.content ol li { margin-bottom: 0.4em; }

/* ── 太字・リンク ── */
.content strong { font-weight: 700; color: var(--ink); }
.content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.18s;
}
.content a:hover { opacity: 0.7; }

/* ── 画像 ── */
.content img {
  max-width: 100%;
  height: auto;
  margin: 1.6em 0;
  border-radius: 4px;
}
.content figure { margin: 1.6em 0; }
.content figcaption {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
  letter-spacing: 0.05em;
}

/* ── テーブル ── */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  font-size: 13px;
}
.content th {
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.content tr:nth-child(even) td { background: #f0e9df; }

/* ── 水平線 ── */
.content hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.4em 0;
}

/* ── コードブロック ── */
.content code {
  font-family: monospace;
  font-size: 13px;
  background: #f0e9df;
  padding: 2px 6px;
  border-radius: 3px;
  color: #8B6F4E;
}
.content pre {
  background: #2a2420;
  color: #e8ddd5;
  padding: 20px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.6em 0;
  font-size: 13px;
  line-height: 1.7;
}
.content pre code { background: none; padding: 0; color: inherit; }

/* ══════════════════════════════════════
   目次デザイン
══════════════════════════════════════ */

.toc-checkbox,
#toc-checkbox,
input[id="toc-checkbox"],
.toc > input[type="checkbox"] {
  display: none !important;
}

#toc,
.toc {
  background: #ede9e3 !important;
  border: 1px solid var(--line) !important;
  border-top: 2px solid var(--accent) !important;
  border-radius: 0 0 4px 4px !important;
  padding: 20px 28px 24px !important;
  margin: 2em 0 !important;
  max-width: 100% !important;
  box-shadow: none !important;
  text-align: center !important;
}

.toc-title,
#toc .toc-title {
  font-family: var(--display) !important;
  font-style: italic !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: 0.2em !important;
  color: var(--accent) !important;
  text-align: center !important;
  margin-bottom: 14px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid var(--line) !important;
  text-transform: uppercase !important;
  display: block !important;
}

.toc ol,
.toc ul,
#toc ol,
#toc ul {
  display: inline-block !important;
  text-align: left !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  counter-reset: toc-item !important;
}

.toc li,
#toc li {
  font-size: 15px !important;
  line-height: 1.7 !important;
  padding: 4px 0 !important;
  border-bottom: none !important;
  display: block !important;
  text-align: left !important;
  counter-increment: toc-item !important;
}

.toc > ol > li::before,
.toc > ul > li::before,
#toc > ol > li::before,
#toc > ul > li::before {
  content: counter(toc-item) ". " !important;
  color: var(--accent) !important;
  font-weight: 700 !important;
}

.toc a,
#toc a {
  color: #555 !important;
  text-decoration: none !important;
  transition: color 0.18s !important;
}
.toc a:hover,
#toc a:hover {
  color: var(--accent) !important;
}

.toc ol ol,
.toc ul ul,
#toc ol ol,
#toc ul ul {
  counter-reset: toc-sub !important;
  padding-left: 1.4em !important;
  margin-top: 2px !important;
  display: block !important;
  text-align: left !important;
}
.toc ol ol li,
.toc ul ul li,
#toc ol ol li,
#toc ul ul li {
  font-size: 14px !important;
  padding: 3px 0 !important;
  counter-increment: toc-sub !important;
}
.toc ol ol li::before,
.toc ul ul li::before,
#toc ol ol li::before,
#toc ul ul li::before {
  content: counter(toc-sub) ". " !important;
  color: var(--muted) !important;
  font-weight: 400 !important;
}
.toc ol ol a,
.toc ul ul a,
#toc ol ol a,
#toc ul ul a {
  color: var(--muted) !important;
}
.toc ol ol a:hover,
.toc ul ul a:hover,
#toc ol ol a:hover,
#toc ul ul a:hover {
  color: var(--accent) !important;
}

/* ── フッター ── */
.site-footer { background: #1a1a18; color: rgba(255,255,255,0.7); padding: 48px 40px; }
.site-footer .top { display: flex; justify-content: space-between; gap: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 32px; margin-bottom: 24px; }
.site-footer .name { font-family: var(--serif); font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.site-footer .sub { font-family: var(--display); font-style: italic; font-size: 11px; letter-spacing: 0.2em; }
.site-footer ul { display: flex; gap: 28px; }
.site-footer ul a { font-size: 11px; letter-spacing: 0.15em; }
.site-footer ul a:hover { color: var(--accent); }
.site-footer .copy { font-size: 10px; color: rgba(255,255,255,0.4); letter-spacing: 0.1em; }

/* ══════════════════════════════════════
   フォトギャラリーページ
══════════════════════════════════════ */
.gallery-hero {
  position: relative; height: 220px; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  text-align: center; border-bottom: 1px solid var(--line); overflow: hidden;
}
.gallery-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, hsl(30,20%,82%) 0%, hsl(30,14%,76%) 100%);
}
.gallery-hero__inner { position: relative; z-index: 1; }
.gallery-hero__en { font-family: var(--display); font-style: italic; font-size: 11px; letter-spacing: 0.3em; color: var(--accent); margin-bottom: 10px; }
.gallery-hero__title { font-family: var(--serif); font-size: 32px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.gallery-hero__desc { font-size: 13px; color: var(--muted); letter-spacing: 0.1em; }
.gallery-filter { display: flex; gap: 8px; flex-wrap: wrap; padding: 28px 40px; border-bottom: 1px solid var(--line); }
.gallery-filter__btn { padding: 7px 18px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 11px; letter-spacing: 0.1em; cursor: pointer; transition: all 0.18s; }
.gallery-filter__btn.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.gallery-filter__btn:hover:not(.is-active) { border-color: var(--accent); color: var(--accent); }
.gallery-wrap { padding: 32px 40px 60px; }
.masonry-grid { position: relative; width: 100%; }
.masonry-item { opacity: 0; cursor: pointer; overflow: hidden; border: 1px solid var(--line); transition: box-shadow 0.2s; }
.masonry-item:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.masonry-item__img img { width: 100%; height: auto; display: block; transition: transform 0.4s ease; }
.masonry-item:hover .masonry-item__img img { transform: scale(1.04); }
.masonry-item__overlay { position: absolute; inset: 0; background: rgba(20,18,15,0); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; transition: background 0.25s; }
.masonry-item:hover .masonry-item__overlay { background: rgba(20,18,15,0.55); }
.masonry-item__title { color: #fff; font-family: var(--serif); font-size: 14px; font-weight: 700; text-align: center; line-height: 1.5; opacity: 0; transform: translateY(8px); transition: all 0.25s 0.05s; }
.masonry-item__tags { color: rgba(255,255,255,0.75); font-size: 10px; letter-spacing: 0.15em; margin-top: 6px; text-align: center; opacity: 0; transform: translateY(8px); transition: all 0.25s 0.08s; }
.masonry-item__icon { color: #fff; font-size: 24px; margin-top: 10px; opacity: 0; transform: scale(0.8); transition: all 0.2s 0.1s; }
.masonry-item:hover .masonry-item__title,
.masonry-item:hover .masonry-item__tags,
.masonry-item:hover .masonry-item__icon { opacity: 1; transform: translateY(0) scale(1); }
.lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(10,8,6,0.92); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.25s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__inner { max-width: 90vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; }
.lightbox__img { max-width: 90vw; max-height: 80vh; object-fit: contain; display: block; }
.lightbox__caption { margin-top: 16px; text-align: center; }
.lightbox__caption-title { color: #fff; font-family: var(--serif); font-size: 14px; font-weight: 700; }
.lightbox__caption-tags { color: rgba(255,255,255,0.5); font-size: 11px; letter-spacing: 0.15em; margin-top: 4px; }
.lightbox__close { position: fixed; top: 24px; right: 32px; color: rgba(255,255,255,0.7); font-size: 20px; cursor: pointer; z-index: 10000; transition: color 0.18s; }
.lightbox__close:hover { color: #fff; }
.lightbox__prev,
.lightbox__next { position: fixed; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.6); font-size: 28px; cursor: pointer; padding: 16px; transition: color 0.18s; z-index: 10000; }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }
.lightbox__prev:hover, .lightbox__next:hover { color: #fff; }
.gallery-empty { text-align: center; color: var(--muted); padding: 80px 0; font-size: 14px; }

/* ══════════════════════════════════════
   レスポンシブ（900px以下）
══════════════════════════════════════ */
@media (max-width: 900px) {
  .site-header { flex-wrap: wrap; padding: 16px 20px; }
  .site-nav ul { gap: 16px; flex-wrap: wrap; }
  .hero { height: 360px; }
  .hero-slide h2 { font-size: 22px; }
  .hero-slide .text { left: 20px; right: 20px; bottom: 80px; }
  .hero-tabs { left: 20px; right: 20px; flex-wrap: wrap; }
  .hero-nav { right: 20px; }
  .category-cards { grid-template-columns: repeat(2, 1fr); padding: 0 20px 20px; }
  .main-grid { grid-template-columns: 1fr; padding: 0 20px 40px; }
  .japan-map-section, .food-filter { padding: 24px 20px; }
  .japan-map-grid { grid-template-columns: 1fr; }
  .ride-stats { grid-template-columns: repeat(2, 1fr); padding: 24px 20px; }
  .ride-stats .stat:nth-child(2) { border-right: 0; }
  .ride-grid { grid-template-columns: 1fr; padding: 0 20px 24px; }
  .shop-grid { grid-template-columns: 1fr; }
  .article-list .item { grid-template-columns: 1fr; }
  .article-list .thumb { width: 100%; height: 200px; }
  .site-footer { padding: 32px 20px; }
  .site-footer .top { flex-direction: column; }
  .tag-tabs { padding: 16px 20px; }
  .single-post h1, article h1 { font-size: 22px; }
  .content h2 { font-size: 18px; }
  .content h3 { font-size: 16px; }
}

/* ══════════════════════════════════════
   レスポンシブ（768px以下）ハンバーガー
══════════════════════════════════════ */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .site-nav { display: none; }
  .site-header { padding: 16px 20px; }
  .hero { height: 380px; }
  .hero-slide h2 { font-size: 20px; }
  .hero-slide .text { left: 20px; right: 20px; bottom: 60px; }
  .hero-nav { right: 20px; bottom: 16px; }
  .category-cards { grid-template-columns: repeat(2, 1fr); padding: 0 16px 24px; gap: 12px; }
  .main-grid { grid-template-columns: 1fr; padding: 0 16px 40px; }
  .article-list .item { grid-template-columns: 1fr; }
  .article-list .thumb { width: 100%; height: 180px; }
  .sidebar { display: none; }
  .section-pad { padding: 24px 16px; }
  .food-filter { padding: 24px 16px; }
  .gallery-filter { padding: 16px; }
  .gallery-wrap { padding: 16px; }
  .japan-map-section { padding: 24px 16px; }
  .japan-map-grid { grid-template-columns: 1fr; }
  #japan-map {
    transform: none;
    transform-origin: unset;
    height: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  #japan-map > div {
    width: 100%;
    text-align: center;
  }
  #japan-map .area {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  #japan-map .area a {
    display: block;
  }
  #japan-map .area div {
    min-width: 56px;
    padding: 6px 8px;
    font-size: 12px;
  }
  .ride-grid { grid-template-columns: 1fr; padding: 0 16px 24px; }
  .ride-stats { grid-template-columns: repeat(2, 1fr); padding: 24px 16px; }
  .ride-stats .stat:nth-child(2) { border-right: 0; }
  .tag-tabs { padding: 16px; }
  .site-footer { padding: 32px 16px; }
  .site-footer .top { flex-direction: column; gap: 20px; }
  .site-footer ul { flex-wrap: wrap; gap: 16px; }
  .gallery-hero { height: 160px; }
  .gallery-hero__title { font-size: 22px; }
  .category-hero-wrap { height: 200px; }
  .single-post h1, article h1 { font-size: 20px; }
  .content h2 { font-size: 17px; padding: 10px 14px; }
  .content h3 { font-size: 15px; }
  #toc, .toc { padding: 16px 18px 18px !important; }
  .toc li, #toc li { font-size: 14px !important; }
  .toc ol ol li, .toc ul ul li, #toc ol ol li, #toc ul ul li { font-size: 13px !important; }
}

/* ── ギャラリー：タイトル・タグを常時表示 ── */
.masonry-item__overlay {
  position: static;
  background: none !important;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.masonry-item__title {
  opacity: 1 !important;
  transform: none !important;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  margin-bottom: 4px;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
}
.masonry-item__tags {
  opacity: 1 !important;
  transform: none !important;
  color: var(--accent);
  font-size: 10px;
  text-align: left;
}
.masonry-item__icon { display: none; }
.masonry-item:hover .masonry-item__overlay { background: none !important; }

/* ── ヒーロー：文字をより見やすく ── */
.hero-slide .text { text-shadow: 0 2px 12px rgba(0,0,0,0.4); }
.hero-slide h2 {
  text-shadow: 0 2px 16px rgba(0,0,0,0.5);
  font-size: 36px;
}
.hero-slide p { text-shadow: 0 1px 8px rgba(0,0,0,0.4); }
.hero-slide .label {
  text-shadow: none;
  background: rgba(0,0,0,0.3);
  padding: 3px 10px;
  display: inline-block;
  letter-spacing: 0.3em;
}
.hero-slide .bg::after {
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.65) 100%);
}

/* ══════════════════════════════════════
   スマホ向け記事表示の修正
══════════════════════════════════════ */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
  .content,
  .entry-content,
  .singular-entry-content,
  .post-content,
  article,
  .hentry {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
  .single-post h1,
  article h1,
  h1, h2, h3, h4,
  .content p,
  .content li,
  .content td,
  .content th,
  p, li {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
  .content h2 { letter-spacing: 0.02em !important; }
  .content h3 { letter-spacing: 0.02em !important; }
  .single-grid,
  .post-grid {
    grid-template-columns: 1fr !important;
  }
  .main-grid {
    grid-template-columns: 1fr !important;
    padding: 0 16px 40px !important;
    gap: 20px !important;
  }
  .sidebar { display: none !important; }
  .section-pad { padding: 20px 16px !important; }
}

/* ── Cocoon干渉リセット（強制上書き） ── */
body {
  width: 100% !important;
  max-width: 100% !important;
}
#container,
#contents,
#content,
.container,
.contents {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  float: none !important;
  display: block !important;
}
.site-wrap {
  max-width: 1200px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

/* ══════════════════════════════════════
   ブログカード（内部リンク）
══════════════════════════════════════ */

.blogcard-wrap {
  border: 1.5px solid #d9cfc2 !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  overflow: hidden !important;
  background: #faf7f3 !important;
  transition: box-shadow 0.2s !important;
  margin: 1.5em 0 !important;
}

.blogcard-wrap:hover {
  box-shadow: 0 4px 16px rgba(139,111,78,0.13) !important;
  background: #faf7f3 !important;
}

.blogcard {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  padding: 0 !important;
  border-left: 4px solid #8B6F4E !important;
  border-radius: 0 !important;
  min-height: 90px !important;
}

.blogcard-thumbnail {
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  height: auto !important;
  min-height: 90px !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

.blogcard-thumbnail img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;
}

.blogcard-content {
  flex: 1 !important;
  padding: 12px 16px !important;
  max-height: none !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  gap: 6px !important;
}

.blogcard-title {
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.6 !important;
  color: #3a2e22 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.blogcard-snipet,
.blogcard-snippet {
  display: none !important;
}

.blogcard-footer {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  position: static !important;
  margin: 0 !important;
  padding: 0 !important;
}

.blogcard-site-name,
.blogcard-domain {
  font-size: 11px !important;
  color: #9e8976 !important;
}

.blogcard-date {
  margin-left: auto !important;
  font-size: 11px !important;
  color: #8B6F4E !important;
  background: #fdf6ef !important;
  border: 1px solid #c4a882 !important;
  border-radius: 20px !important;
  padding: 2px 10px !important;
  white-space: nowrap !important;
}

.blogcard-date::after {
  content: "\00a0 記事を読む →" !important;
}

@media (max-width: 580px) {
  .blogcard {
    flex-direction: column !important;
  }
  .blogcard-thumbnail {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 120px !important;
    min-height: 120px !important;
  }
  .blogcard-content {
    padding: 10px 12px !important;
  }
}
