/* =====================================================
   CSS Custom Properties — サイト設定から上書きされる
   ===================================================== */
:root {
  --accent:        #c9364f;
  --accent-dark:   #a02940;
  --bg:            #0f1117;
  --surface:       #1a1d27;
  --surface-2:     #222638;
  --border:        #2a2d3e;
  --text:          #e2e8f0;
  --text-muted:    #94a3b8;
  --text-faint:    #4a5568;
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --header-h:      56px;
  --container:     1160px;
  --grid-gap:      20px;
  --transition:    0.18s ease;
}

html.theme-light {
  --bg:          #ffffff;
  --surface:     #ffffff;
  --surface-2:   #f7f7f8;
  --border:      #e5e7eb;
  --text:        #171717;
  --text-muted:  #5f6368;
  --text-faint:  #9aa0a6;
}

/* =====================================================
   リセット & ベース
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =====================================================
   レイアウト
   ===================================================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.site-main {
  flex: 1;
  padding: 32px 0 64px;
}

/* =====================================================
   ヘッダー
   ===================================================== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity var(--transition);
}
.site-logo:hover { opacity: 0.8; text-decoration: none; }

.header-nav {
  display: flex;
  gap: 4px;
}
.header-nav a {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
}
.header-nav a:hover,
.header-nav a.active {
  color: var(--text);
  background: var(--border);
}

/* 検索ボタン（ヘッダーナビ内） */
.header-search-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.header-search-btn:hover,
.header-search-btn[aria-expanded="true"] {
  color: var(--text);
  background: var(--border);
}

/* 検索ドロワー（ヘッダー直下・PC/スマホ共通） */
.search-drawer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
  background: var(--surface);
  border-top: 1px solid transparent;
}
.search-drawer.is-open {
  max-height: 400px;
  border-top-color: var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
html.theme-light .search-drawer.is-open {
  box-shadow: 0 10px 28px rgba(17,24,39,0.08);
}
.search-drawer-inner {
  padding: 12px 20px;
  max-width: 820px;
  margin: 0 auto;
}
.search-drawer-results {
  position: static;
  width: 100%;
  max-height: 280px;
  overflow: auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 4px 0;
  z-index: auto;
}
.search-drawer-results .search-result-item { padding: 8px 4px; }
.search-drawer-results .search-all-link { padding: 8px 4px; }

.search-form {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-faint);
  font-size: 16px;
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 6px 32px 6px 30px;
}
.search-input:focus {
  border-color: var(--accent);
  outline: none;
}
.search-clear {
  position: absolute;
  right: 4px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.search-clear:hover { background: var(--border); color: var(--text); }
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(420px, 86vw);
  max-height: 70vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0,0,0,0.45);
  z-index: 200;
  padding: 8px;
}
html.theme-light .search-results {
  box-shadow: 0 18px 42px rgba(17,24,39,0.12);
}
.search-result-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
}
.search-result-item:hover {
  background: var(--surface-2);
  text-decoration: none;
}
.search-result-thumb {
  width: 58px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg);
}
.search-result-body {
  min-width: 0;
}
.search-result-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}
.search-result-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 2px;
}
.search-empty {
  color: var(--text-muted);
  font-size: 13px;
  padding: 12px;
}
.search-all-link {
  display: block;
  padding: 8px 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

/* 廃止: header-search / search-toggle-sp / search-panel-sp → search-drawer に統合 */

/* =====================================================
   ボトムナビ（SP専用・画面下部固定）
   ===================================================== */
.bottom-nav { display: none; }

/* 検索結果ページ ソート・件数コントロール */
.search-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.search-ctrl-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-ctrl-label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.search-ctrl-select {
  font-size: 13px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  min-width: 140px;
}
.search-more-note {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 16px;
}

/* =====================================================
   セクション見出し
   ===================================================== */
.home-section {
  margin-bottom: 34px;
}

.section-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-heading {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.section-header .section-heading {
  margin-bottom: 0;
}

.section-more-link {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.section-more-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.page-header {
  margin-bottom: 32px;
}
.page-title {
  font-size: 26px;
  font-weight: 700;
}
.page-desc {
  color: var(--text-muted);
  margin-top: 8px;
}

/* =====================================================
   記事グリッド
   ===================================================== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--grid-gap);
  margin-bottom: 32px;
}

.home-articles-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

@media (max-width: 620px) {
  .articles-grid,
  .home-articles-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   記事カード
   ===================================================== */
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
html.theme-light .article-card:hover {
  box-shadow: 0 10px 28px rgba(17,24,39,0.10);
}

.card-thumb {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-2);
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform var(--transition);
}
.article-card:hover .card-thumb img {
  transform: scale(1.04);
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.card-source {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 4px;
}

.card-date {
  font-size: 12px;
  color: var(--text-faint);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 8px;
}
.card-title a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}
.card-title a:hover { color: var(--accent); }

.card-product-meta {
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 8px;
}

.card-summary {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 14px;
}

.card-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition);
  align-self: flex-start;
}
.card-btn:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

/* =====================================================
   もっと見るボタン
   ===================================================== */
.load-more-wrap {
  text-align: center;
  margin-top: 12px;
}
.btn-load-more {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 32px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.btn-load-more:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

/* =====================================================
   記事詳細
   ===================================================== */
.single-article {
  max-width: 780px;
  margin: 0 auto;
}

.breadcrumb {
  margin-bottom: 18px;
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  color: var(--text-faint);
  font-size: 12px;
}
.breadcrumb-list li:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: var(--text-faint);
}
.breadcrumb-list a {
  color: var(--text-muted);
}

.single-header {
  margin-bottom: 32px;
}
.single-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.single-meta time {
  font-size: 13px;
  color: var(--text-faint);
}

.single-title {
  font-size: clamp(20px, 3.5vw, 32px);
  font-weight: 800;
  line-height: 1.4;
}

.product-hero {
  margin: 0 0 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}
.product-hero img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.product-meta-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 28px;
}
.product-meta-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.product-meta-row:first-child { padding-top: 0; }
.product-meta-row:last-of-type { border-bottom: none; }
.product-meta-row span {
  color: var(--text-faint);
  font-size: 12px;
}
.product-meta-row strong {
  color: var(--text);
  font-weight: 600;
}
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.product-tags span {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  padding: 3px 8px;
}

/* Prose（記事本文）*/
.single-body.prose {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}
.prose h1,.prose h2,.prose h3,.prose h4 {
  margin: 2em 0 0.6em;
  font-weight: 700;
  line-height: 1.4;
}
.prose h2 { font-size: 1.35em; border-bottom: 1px solid var(--border); padding-bottom: 0.3em; }
.prose h3 { font-size: 1.15em; }
.prose p  { margin-bottom: 1.3em; }
.prose ul,.prose ol { margin: 0 0 1.3em 1.5em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 8px 16px;
  margin: 1.5em 0;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose strong { color: var(--accent); }
.prose a { color: var(--accent); }
.prose img { border-radius: var(--radius); margin: 1.5em auto; }
.prose code {
  background: var(--surface-2);
  border-radius: 4px;
  font-size: 0.88em;
  padding: 2px 6px;
}
.prose pre {
  background: var(--surface-2);
  border-radius: var(--radius);
  overflow-x: auto;
  padding: 16px;
  margin: 1.5em 0;
}
.prose pre code { padding: 0; background: none; }

.sample-movie {
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 32px 0 18px;
  overflow: hidden;
  position: relative;
  width: 100%;
}
.sample-movie-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #000;
}
.sample-movie iframe {
  border: 0;
  display: block;
  width: 100%;
  max-width: 100%;
}
.sample-movie > iframe,
.sample-movie > object,
.sample-movie > embed {
  aspect-ratio: 16 / 9;
  display: block;
  height: auto;
  max-width: 100%;
  width: 100%;
}
.sample-movie video {
  width: 100%;
  border-radius: var(--radius);
  background: #000;
}

.sample-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 28px 0 36px;
}
.sample-gallery a {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}
.sample-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}
.sample-gallery a:hover img { transform: scale(1.04); }

.article-tags {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 34px 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.article-tags-group {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
}
.article-tags-group > span {
  color: var(--text-faint);
  font-size: 12px;
  padding-top: 5px;
}
.article-tags-group div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.article-tags-group a,
.result-tag {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 8px;
  text-decoration: none;
}
.article-tags-group a:hover,
.result-tag:hover {
  border-color: var(--accent);
  color: var(--text);
  text-decoration: none;
}
.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.result-tag {
  cursor: pointer;
  font-family: inherit;
}

.legal-page {
  max-width: 820px;
}

.site-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.site-map section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.site-map h2 {
  font-size: 17px;
  margin-bottom: 12px;
}
.site-map ul {
  padding-left: 18px;
}
.site-map li + li {
  margin-top: 6px;
}

/* 広告枠 */
.ad-carousel-wrap {
  margin: 0 auto 24px;
  overflow: hidden;
  position: relative;
}
.ad-carousel {
  cursor: grab;
  overflow: hidden;
  padding: 10px 0;
  user-select: none;
}
.ad-carousel.dragging {
  cursor: grabbing;
}
.ad-carousel-inner {
  display: flex;
  gap: 10px;
  width: max-content;
  will-change: transform;
}
.ad-item {
  display: block;
  flex-shrink: 0;
  height: 250px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  width: 300px;
}
.ad-item img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  width: 100%;
}
.ad-item--embed iframe {
  display: block;
  height: 250px;
  width: 300px;
}
.ad-grid-section {
  margin: 20px 0 26px;
}
.ad-label {
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}
.ad-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ad-grid-item,
.ad-between-img {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  overflow: hidden;
  text-decoration: none;
}
.ad-grid-item img {
  border-radius: 4px;
  display: block;
  height: 70px;
  object-fit: cover;
  width: 100%;
}
.ad-item--text,
.ad-grid-item--text,
.ad-between-img--text {
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  min-height: 80px;
  padding: 10px;
}
.ad-item__label,
.ad-grid-item__label,
.ad-between-img__label {
  background: var(--accent);
  border-radius: 3px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
}
.ad-item__name,
.ad-grid-item__name,
.ad-between-img__name {
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}
.ad-item__desc,
.ad-grid-item__desc,
.ad-between-img__desc {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.3;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}
.ad-item--embed,
.ad-grid-item--embed,
.ad-between-img--embed {
  background: none;
  border: none;
  min-height: 90px;
  overflow: hidden;
}
.ad-item--embed iframe,
.ad-grid-item--embed iframe,
.ad-between-img--embed iframe {
  border: 0;
  display: block;
  height: 120px;
  max-width: 100%;
  width: 100%;
}
.ad-between-img-wrap {
  max-width: 100%;
  overflow: hidden;
  width: 100%;
}
.ad-between-img {
  margin: 12px 0;
}
.ad-between-img img {
  border-radius: 4px;
  flex-shrink: 0;
  height: 56px;
  object-fit: cover;
  width: 80px;
}

/* 人気タグ */
.taxonomy-section {
  margin-top: 34px;
}
.tag-section {
  margin-bottom: 24px;
}
.tag-section-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}
.tag-section-title {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.popular-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.popular-tag-link {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-size: 13px;
  padding: 5px 14px;
  text-decoration: none;
  white-space: nowrap;
}
.popular-tag-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.taxonomy-term-list {
  align-items: flex-start;
}
.taxonomy-term-link {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}
.taxonomy-term-count {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

/* 旧記事ショートコード互換の商品表示 */
.fanza-product {
  margin: 40px 0;
}
.fanza-product__section {
  margin: 0 0 28px;
}
.fanza-product__samples {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fanza-product__samples img {
  border-radius: var(--radius-sm);
  display: block;
  height: auto;
  width: 100%;
}
.fanza-sample-link {
  display: block;
  position: relative;
}
.fanza-sample-link::after {
  background: rgba(201, 54, 79, 0);
  border-radius: var(--radius-sm);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  transition: background var(--transition);
}
.fanza-sample-link:hover::after {
  background: rgba(201, 54, 79, 0.12);
}
.fanza-product__video,
.fanza-product__video-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
}
.fanza-product__video {
  display: block;
}
.fanza-video-iframe {
  border: 0;
  display: block;
  width: 100%;
}
.fanza-product__video-note,
.fanza-product__credit,
.fanza-product__missing {
  color: var(--text-muted);
  font-size: 12px;
}
.fanza-product__credit {
  margin: 14px 0 0;
  text-align: center;
}
.fanza-link-card {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  gap: 16px;
  margin: 0 0 28px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--transition), transform var(--transition);
}
.fanza-link-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}
.fanza-link-card__img {
  flex-shrink: 0;
  height: 140px;
  object-fit: cover;
  width: 100px;
}
.fanza-link-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 16px 16px 16px 0;
}
.fanza-link-card__title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
}
.fanza-link-card__sub {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fanza-link-card__btn {
  align-self: flex-start;
  background: var(--accent);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
  padding: 8px 14px;
}

/* アフィリエイトCTA */
.affiliate-cta {
  margin: 40px 0;
  text-align: center;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.btn-affiliate {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 40px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.btn-affiliate:hover {
  background: var(--accent-dark);
  transform: scale(1.02);
  text-decoration: none;
}
.affiliate-note {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 10px;
}

/* 記事ナビ */
.single-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.single-nav a {
  color: var(--text-muted);
  flex: 1;
  transition: color var(--transition);
}
.single-nav a:hover { color: var(--accent); }
.nav-next { text-align: right; }

/* 関連記事 */
.related-articles {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

/* =====================================================
   外部リンク集（相互リンク・姉妹サイト）
   ===================================================== */
.external-links-section {
  margin-top: 40px;
  padding: 24px 0 8px;
  border-top: 1px solid var(--border);
}

.external-links-group {
  margin-bottom: 20px;
}

.external-links-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 8px;
}

.external-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.external-links-item {
  font-size: 13px;
  line-height: 1.6;
}

.external-links-item a {
  color: var(--text-muted);
  text-decoration: none;
}

.external-links-item a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.external-links-desc {
  color: var(--text-faint);
  font-size: 12px;
}

/* =====================================================
   フッター
   ===================================================== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 28px 20px;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-copy { font-size: 13px; color: var(--text-faint); }

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-nav a { font-size: 12px; color: var(--text-muted); }
.footer-nav a:hover { color: var(--text); }

.footer-note {
  font-size: 11px;
  color: var(--text-faint);
}

/* =====================================================
   ページネーション
   ===================================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s, transform 0.2s;
  user-select: none;
}
.pagination-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  transform: translateY(-2px);
}
html.theme-light .pagination-btn:hover {
  box-shadow: 0 6px 16px rgba(17,24,39,0.12);
}
.pagination-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  cursor: default;
  pointer-events: none;
}
.pagination-btn.is-disabled {
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
}

/* =====================================================
   空状態
   ===================================================== */
.empty-state {
  color: var(--text-faint);
  text-align: center;
  padding: 48px 20px;
  font-size: 15px;
}

/* =====================================================
   レスポンシブ
   ===================================================== */
@media (max-width: 640px) {
  .site-header {
    height: var(--header-h);
  }
  .header-inner {
    padding-top: 0;
    padding-bottom: 0;
  }
  .site-logo {
    font-size: 18px;
  }
  /* SP: ヘッダーナビはボトムナビに統合するため隠す */
  .header-nav { display: none; }

  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px 6px;
    color: var(--text-muted);
    font-size: 11px;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
  }
  .bottom-nav-item:hover,
  .bottom-nav-item:focus-visible {
    color: var(--text);
    text-decoration: none;
  }
  .bottom-nav-icon { font-size: 18px; line-height: 1; }
  .bottom-nav-label { font-size: 10px; }

  .site-main { padding-bottom: 16px; }
  .site-footer { padding-bottom: calc(28px + 64px + env(safe-area-inset-bottom, 0)); }

  /* SP: 検索ドロワーは search-drawer.is-open で展開 */
  .search-drawer.is-open { max-height: 500px; }

  .articles-grid { grid-template-columns: 1fr; }
  .ad-grid,
  .site-map { grid-template-columns: 1fr 1fr; }
  .section-more-link {
    font-size: 15px;
    padding: 4px 2px;
  }
  .single-article { padding: 0; }
  .article-tags-group,
  .product-meta-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .fanza-link-card__img { height: 100px; width: 72px; }
}

/* 検索・タクソノミーページのカードサムネイル */
.card-thumb-link {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-2);
}
.card-mgmt-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* =====================================================
   人気記事ランキングページ（カードグリッド形式）
   ===================================================== */
.ranking-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gap);
}

/* 1〜3位：1列全幅 */
.ranking-card--large {
  grid-column: 1 / -1;
}
.ranking-card--large .ranking-card-title {
  font-size: 15px;
}

.ranking-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.ranking-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
html.theme-light .ranking-card:hover {
  box-shadow: 0 10px 28px rgba(17,24,39,0.10);
}
.ranking-card > a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.ranking-card-thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-2);
}
.ranking-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition);
}
.ranking-card:hover .ranking-card-thumb {
  transform: scale(1.04);
}

.ranking-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.5px;
  z-index: 1;
  background: rgba(0,0,0,0.78);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.55);
}
.ranking-card--large .ranking-badge {
  top: 10px;
  left: 10px;
  min-width: 60px;
  height: 60px;
  padding: 0 12px;
  border-radius: 30px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.6);
}
.ranking-badge--top1 { background: #e6b800; color: #1a0f00; box-shadow: 0 3px 12px rgba(230,184,0,0.6); }
.ranking-badge--top2 { background: #a8a8b0; color: #111; box-shadow: 0 3px 12px rgba(168,168,176,0.6); }
.ranking-badge--top3 { background: #b05c1a; color: #fff; box-shadow: 0 3px 12px rgba(176,92,26,0.6); }

.ranking-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  padding: 10px 12px 12px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (max-width: 480px) {
  .ranking-card-title { font-size: 12px; padding: 8px 10px 10px; }
  .ranking-card--large .ranking-card-title { font-size: 13px; }
}
