/* 作品マップ - ライト配色（ダークは使わない方針） */

:root {
  --bg: #ffffff;
  --surface: #f7f8fa;
  --border: #e3e6ea;
  --text: #1c2024;
  --muted: #6b7280;
  --accent: #d4145a;
  --accent-hover: #b0104a;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Meiryo", sans-serif;
  line-height: 1.7;
  font-size: 15px;
}

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

/* ── 背景（白地にピンクのグラデーション＋スクロール連動）────────
   ★依存を足さずCSSだけで動かす。JSのスクロール監視は
     3,500ページ全部で走るうえ、モバイルで確実に重くなる。
   ⚠ここは装飾なので、対応していないブラウザでは**ただの静止グラデーション**に
     落ちればよい（@supports で分岐）。読めなくなる要素は一切足さない。 */
.bg-aura {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 12% 0%, #ffe3ee 0%, rgba(255, 227, 238, 0) 70%),
    radial-gradient(55% 40% at 92% 18%, #ffeef4 0%, rgba(255, 238, 244, 0) 72%),
    radial-gradient(70% 50% at 50% 100%, #fff0f5 0%, rgba(255, 240, 245, 0) 70%),
    linear-gradient(180deg, #ffffff 0%, #fffafc 55%, #fff4f8 100%);
}

@keyframes auraDrift {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
  to { transform: translate3d(0, -6%, 0) scale(1.12); opacity: 0.85; }
}

/* スクロール量に連動させる（Chrome 115+ / Edge）。無ければ静止したまま */
@supports (animation-timeline: scroll()) {
  .bg-aura {
    animation: auraDrift linear both;
    animation-timeline: scroll(root block);
  }
}

/* ⚠動きを減らす設定の人には動かさない */
@media (prefers-reduced-motion: reduce) {
  .bg-aura { animation: none !important; }
}

/* ── 年齢確認 ─────────────────────────────── */
.agegate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.agegate[hidden] { display: none; }
body.agegate-open { overflow: hidden; }

.agegate-box {
  max-width: 420px;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}
.agegate-title { font-size: 20px; margin: 0 0 16px; }
.agegate-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-secondary {
  display: inline-block;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 24px;
  font-size: 15px;
}

/* ── ヘッダ ───────────────────────────────── */
/* 背景のグラデーションを透かす（不透明だと帯だけ白く抜ける） */
.site-header {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}
.site-name { font-weight: 700; font-size: 17px; }
/* ⚠日本語のナビは折り返すと「ジャン/ル」のように語の途中で割れる。
   幅が足りないときは折り返さず横スクロールさせる。 */
.site-nav { display: flex; gap: 16px; font-size: 14px; color: var(--muted); }
.site-nav a { white-space: nowrap; }

/* ── PR表記（景表法ステマ規制） ────────────────── */
.pr-label {
  margin: 0;
  padding: 6px 20px;
  background: rgba(247, 248, 250, 0.75);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

/* ── 本文 ────────────────────────────────── */
.main { max-width: 1080px; margin: 0 auto; padding: 24px 20px 48px; }
.page-title { font-size: 22px; margin: 0 0 8px; line-height: 1.4; }
.page-lead { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.section-title { font-size: 17px; margin: 32px 0 12px; }

/* ── カード一覧 ────────────────────────────── */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px 16px;
}
.card-link { display: block; }
.card-img {
  width: 100%;
  height: auto;
  aspect-ratio: 7 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  margin-top: 8px;
}
.card-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── 索引一覧 ─────────────────────────────── */
.index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.index-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
}
.index-count { color: var(--muted); font-size: 12px; }

/* ── 作品ページ ────────────────────────────── */
/**
 * ★作品ページは「画像左／情報と出口右」の2カラム。
 *   1カラムだと画像だけで1画面が埋まり、CTAが折り返しの下に落ちる。
 *   出口に届くまでスクロールが要るのは、アフィリエイトサイトとして構造的な欠陥。
 */
.item-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-top: 16px;
}
.item-visual { position: sticky; top: 16px; }
.item-img {
  max-width: 300px;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.item-meta {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 4px 12px;
  margin: 0 0 20px;
  font-size: 14px;
}
.item-meta dt { color: var(--muted); }
.item-meta dd { margin: 0; }

.tag-row { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.tag-label { font-size: 12px; color: var(--muted); min-width: 60px; }
.tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
}
.item-cta { margin-top: 28px; }

/* ── ランキング ────────────────────────────── */
.tabs { display: flex; gap: 8px; margin: 0 0 20px; flex-wrap: wrap; }
.tab {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  background: var(--surface);
}
.tab-on { background: var(--accent); color: #fff; border-color: var(--accent); }
.tab-on:hover { color: #fff; }

/**
 * ★ランキングは1列の全幅リストではなく多列にする。
 *   1列だと1行が全幅を使って右が7割空き、1画面に3〜4件しか入らない。
 *   FANZAは同じ面積に3〜4倍を詰めていて、**この密度自体が構造の一部**。
 *   一覧は「見比べるもの」なので、比べられる数が画面に乗らないと機能しない。
 */
.ranking {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rank;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 0 20px;
}
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.rank-no {
  flex: 0 0 32px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--muted);
}
.rank-row:nth-child(-n + 3) .rank-no { color: var(--accent); font-size: 18px; }
.rank-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.rank-img {
  flex: 0 0 70px;
  border-radius: 4px;
  border: 1px solid var(--border);
  object-fit: cover;
}
.rank-body { min-width: 0; }
.rank-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
}
.rank-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.more { margin: 14px 0 0; font-size: 14px; }
.more a { color: var(--accent); font-weight: 600; }

/* ── ページ送り ────────────────────────────── */
.pager {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  font-size: 14px;
}
.pager-pos { color: var(--muted); }

/* ── セクション構造 ──────────────────────────
   ★FANZA同人トップの構造を写した部分。
     同じ在庫を時間軸で何度も切り直し、縦にセクションを積む。
     ⚠横スクロールのレールではない（実物を調べたら1本も無かった）。
     セクションの切れ目が読めることが構造の前提なので、
     見出し・根拠・もっと見るを1つの型にまとめてある。 */
.block { margin: 0 0 40px; }
.block:first-of-type { margin-top: 28px; }

.section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--text);
  margin-bottom: 14px;
}
.section-head .section-title { margin: 0; font-size: 18px; letter-spacing: 0.02em; }
.section-note { margin: 0; font-size: 12px; color: var(--muted); }
.section-more { margin-left: auto; font-size: 13px; color: var(--accent); white-space: nowrap; }
.section-more::after { content: " →"; }

/* 鮮度＝再訪の理由。ビルド時刻ではなくデータの最新日を出す */
.freshness {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 8px 12px;
}
.freshness b { color: var(--text); }

/* 上位3件だけ色を変える。順位が「読み取れる」ようにするための最小限 */
.rank-no-top { color: var(--accent); font-weight: 700; }
.score { color: var(--accent); font-weight: 700; }
.rank-who, .card-who {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* カードのサムネに評価を重ねる＝一覧のまま比べられる */
.card-thumb { position: relative; display: block; }
.card-score {
  position: absolute;
  left: 6px;
  bottom: 6px;
  background: rgba(28, 32, 36, 0.82);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.cards-sm { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 12px; }

/* 新着を発売日で束ねる。件数があると「今日は多い」が分かる */
.day-group { margin-bottom: 24px; }
.day-title {
  font-size: 14px;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.day-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: #fdeef4;
  border-radius: 999px;
  padding: 2px 9px;
}

/* 軸別の1位。全体1位は1つしか作れないが、軸別なら大量に作れる */
.axis-tops {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.axis-top {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--bg);
}
.axis-top-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.axis-top-tag:hover { color: var(--accent); }
.axis-top-link { display: flex; gap: 10px; align-items: flex-start; }
.axis-top-img {
  width: 56px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--surface);
  flex: none;
}
.axis-top-body { min-width: 0; }
.axis-top-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
}

/* 作品ページの関連＝回遊の本体。ここが無いと作品ページが行き止まりになる */
.related { margin-top: 40px; }

/* ── お知らせポップアップ ───────────────────────
   ★年齢確認の後・1日1回・必ず閉じられる（条件は promo.js 側）。
     開いた瞬間に2枚重ねるとアンテナサイトの審査で嫌われる。 */
.promo {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(28, 32, 36, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: promoIn 0.22s ease-out;
}
.promo[hidden] { display: none; }
@keyframes promoIn { from { opacity: 0; } to { opacity: 1; } }

.promo-box {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 14px;
  padding: 24px 22px 22px;
  box-shadow: 0 18px 50px rgba(180, 20, 80, 0.18);
  border-top: 4px solid var(--accent);
  animation: promoUp 0.26s ease-out;
}
@keyframes promoUp { from { transform: translateY(10px); } to { transform: translateY(0); } }

.promo-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 8px;
}
.promo-close:hover { color: var(--text); }

.promo-eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.promo-item { display: flex; gap: 12px; align-items: flex-start; }
.promo-img {
  width: 90px;
  height: 128px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  flex: none;
}
.promo-body { min-width: 0; }
.promo-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.promo-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.promo-text { font-size: 12px; color: var(--muted); margin: 14px 0 16px; }
.promo-cta { display: block; text-align: center; }

/* ── インフィード広告 ───────────────────────────
   ★一覧に混ぜるが、⚠**本物のカードと同じ見た目にはしない**。
     誤クリックを取りにいくと規約・景表法に触れ、
     アンテナサイトの審査で落ちる理由にもなる。 */
.card-ad-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 7 / 10;
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  background: #fff7fa;
  text-align: center;
  padding: 10px;
}
.card-ad-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  background: var(--accent);
  border-radius: 3px;
  padding: 2px 8px;
}
.card-ad-name { font-size: 12px; font-weight: 700; color: var(--accent); line-height: 1.4; }
.card-ad .card-title { color: var(--muted); }

/* ── CTA ─────────────────────────────────── */
.cta {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px;
  border-top: 1px solid var(--border);
}
.cta-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.cta-link {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
}
.cta-link:hover { background: var(--accent); color: #fff; }
.cta-note { margin: 0; font-size: 13px; color: var(--muted); }

/* ── 問い合わせフォーム ───────────────────────── */
.contact-form { max-width: 560px; margin-top: 24px; }
.field { display: block; margin-bottom: 18px; }
.field-label { display: block; font-size: 13px; margin-bottom: 6px; font-weight: 600; }
.field .req {
  display: inline-block; margin-left: 8px; padding: 1px 7px;
  background: var(--accent); color: #fff; border-radius: 3px;
  font-size: 11px; font-weight: 700;
}
.field .opt { margin-left: 8px; color: var(--muted); font-weight: 400; font-size: 12px; }
.field input, .field textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 15px; font-family: inherit; background: var(--bg); color: var(--text);
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.field textarea { resize: vertical; }

/* ハニーポット。画面にも読み上げにも出さないが、DOMには置く */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.form-result { margin-top: 14px; font-size: 14px; min-height: 1.4em; }
.form-result.ok { color: #1a7f4b; font-weight: 600; }
.form-result.ng { color: var(--accent); font-weight: 600; }
.form-fallback { margin-top: 24px; font-size: 13px; color: var(--muted); }

/* ── アンテナサイトのログパーツ枠 ─────────────────── */
.logpart { max-width: 1080px; margin: 0 auto; padding: 8px 20px; }
.logpart:empty { display: none; }

/* ── フッタ ───────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 20px;
  font-size: 12px;
  color: var(--muted);
}
.site-footer p { margin: 0 0 4px; }

/* 2カラムが窮屈になる幅で1カラムへ。画像の固定は解く */
@media (max-width: 760px) {
  .item-hero { grid-template-columns: 1fr; gap: 20px; }
  .item-visual { position: static; }
  .item-img { max-width: 220px; }
}

@media (max-width: 600px) {
  .cards { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .cards-sm { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .site-header { flex-wrap: nowrap; gap: 12px; padding: 12px 14px; }
  .site-name { flex: none; }
  .site-nav {
    font-size: 13px;
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .section-head { border-bottom-width: 1px; }
  .section-head .section-title { font-size: 16px; }
  .axis-tops { grid-template-columns: 1fr; }
}

/* ── 読み物（記事）─────────────────────────────────────────
   ★実データが入るまでの間、サイトの中身はここが本体になる。
     一覧は「読む前に中身が分かる」ことを優先し、タイトルだけ並べない。 */
.read-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.read-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.read-link {
  display: grid;
  gap: 4px;
  padding: 16px;
}

.read-card:hover { border-color: var(--accent); }

.read-tag {
  justify-self: start;
  font-size: 11px;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 1px 8px;
}

.read-title { font-size: 16px; font-weight: 700; line-height: 1.5; }
.read-lead { font-size: 13px; color: var(--muted); }
.read-date { font-size: 12px; color: var(--muted); }

.read-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
}

/* 記事本文。★1行の長さを抑える（長文をそのまま全幅で流すと読めない） */
.article-body { max-width: 42em; }
.article-body p { margin: 0 0 1.2em; }
.article-body h2 { margin: 2em 0 0.6em; }
.article-body h3 { font-size: 15px; margin: 1.6em 0 0.5em; }

.article-list { margin: 0 0 1.2em; padding-left: 1.4em; }
.article-list li { margin-bottom: 0.4em; }

.article-body blockquote {
  margin: 0 0 1.2em;
  padding: 8px 16px;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

@media (min-width: 640px) {
  .read-cards { grid-template-columns: repeat(2, 1fr); }
}

/* 広告カードを単体で置くとき。★.cards は auto-fill なので1枚だと全幅に伸びる */
.cards-ad { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); max-width: 300px; }
