/* ============================================================
   components.css — メディアUI部品（レスポンシブ）
   ============================================================ */

/* ---------- 記事カード（縦型） ---------- */
.card { display: block; background: var(--c-surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s ease; }
.card:hover, .card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.card .thumb { position: relative; }
.card .thumb .badge { position: absolute; left: 9px; top: 9px; z-index: 2; }
.card .card-body { padding: 11px 12px 13px; }
.card .card-title { font-size: var(--fz-sm); font-weight: 500; line-height: 1.5; color: var(--c-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(var(--fz-sm) * 1.5 * 2); }
.card .card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.card .card-meta .date { font-size: var(--fz-micro); color: var(--c-ink-3); }

/* グリッド：SP2 → Tablet3 → PC4 */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
@media (min-width: 768px) { .card-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: repeat(4, 1fr); gap: 22px; }
  .layout .content-main .card-grid { grid-template-columns: repeat(3, 1fr); } /* サイドバー併設時は3列 */
}

/* ---------- 横型リストカード（アーカイブB） ---------- */
.card-row { display: grid; grid-template-columns: 132px 1fr; gap: 12px; background: var(--c-surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); transition: transform .2s, box-shadow .2s; }
.card-row:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card-row .thumb { position: relative; }
.card-row .thumb .badge { position: absolute; left: 7px; top: 7px; }
.card-row .card-body { padding: 11px 12px 11px 0; display: flex; flex-direction: column; gap: 7px; }
.card-row .card-title { font-size: var(--fz-sm); font-weight: 500; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-row .excerpt { display: none; font-size: var(--fz-xs); color: var(--c-ink-2); line-height: 1.7; }
.card-row .card-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.card-row .card-meta .date { font-size: var(--fz-micro); color: var(--c-ink-3); }
.list-stack { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 768px) {
  .card-row { grid-template-columns: 240px 1fr; }
  .card-row .card-body { padding: 16px 18px 16px 0; gap: 10px; }
  .card-row .card-title { font-size: var(--fz-lead); -webkit-line-clamp: 2; }
  .card-row .excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ---------- ランキング ---------- */
.rank-block { display: block; }
.rank-feat { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); display: block; }
.rank-feat .ph, .rank-feat .media { aspect-ratio: 16/10; }
.rank-feat .ov { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; background: linear-gradient(0deg, rgba(0,0,0,.78) 8%, rgba(0,0,0,0) 62%); color: #fff; }
.rank-feat .no { position: absolute; top: 13px; left: 13px; background: var(--accent); color: var(--accent-ink); font-weight: 500; font-size: var(--fz-xs); padding: 4px 11px; border-radius: 6px; letter-spacing: .06em; }
.rank-feat h3 { font-size: var(--fz-lead); font-weight: 500; line-height: 1.45; }
.rank-feat .sub { display: flex; align-items: center; gap: 9px; margin-top: 9px; }

.rank-list { display: flex; flex-direction: column; }
.rank-item { display: grid; grid-template-columns: 38px 84px 1fr; gap: 11px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--c-line); }
.rank-item:last-child { border-bottom: none; }
.rank-no { font-size: 22px; font-weight: 500; font-style: italic; text-align: center; color: var(--c-line-2); font-variant-numeric: tabular-nums; line-height: 1; }
.rank-item.top1 .rank-no, .rank-item.top2 .rank-no, .rank-item.top3 .rank-no { color: var(--accent); }
.rank-item .thumb { border-radius: 8px; overflow: hidden; }
.rank-item .info .r-title { font-size: var(--fz-sm); font-weight: 500; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-item .info .sub { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
@media (min-width: 1024px) {
  .rank-block { display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px; align-items: start; }
  .rank-feat h3 { font-size: 22px; }
  .rank-feat .ov { padding: 24px; }
}

/* ---------- ジャンルタイル ---------- */
.genre-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
@media (min-width: 768px) { .genre-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .genre-tiles { grid-template-columns: repeat(4, 1fr); } }
.genre-tile { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/10; display: flex; align-items: flex-end; box-shadow: var(--shadow-card); }
.genre-tile .ph, .genre-tile .media { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }
.genre-tile .label { position: relative; z-index: 2; width: 100%; padding: 12px; color: #fff; font-size: var(--fz-sm); font-weight: 500; letter-spacing: .04em; background: linear-gradient(0deg, rgba(0,0,0,.62), rgba(0,0,0,0)); }
.genre-tile .label small { display: block; font-size: var(--fz-micro); opacity: .82; font-weight: 400; margin-top: 2px; }

/* セクション余白 */
.block { margin-bottom: 40px; }
.block:last-child { margin-bottom: 0; }

/* ---------- パンくず ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fz-micro); color: var(--c-ink-3); margin-bottom: 14px; }
.crumbs a { color: var(--c-ink-2); }
.crumbs .sep { opacity: .6; }

/* ---------- 記事ヘッダー ---------- */
.article-head .cat { display: flex; gap: 6px; margin-bottom: 12px; }
.article-head .a-title { font-size: var(--fz-h1); font-weight: 500; line-height: 1.5; letter-spacing: .005em; }
.article-head .metaline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-bottom: 16px; }
.article-head .who { display: flex; align-items: center; gap: 7px; font-size: var(--fz-xs); color: var(--c-ink-2); }
.article-head .who .av { width: 26px; height: 26px; border-radius: 50%; background: var(--c-surface-3); }
.article-head .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--c-line-2); }
.article-head time { font-size: var(--fz-xs); color: var(--c-ink-3); }
.eyecatch { margin: 4px 0 0; }
.eyecatch .ph, .eyecatch .media { border-radius: var(--radius); aspect-ratio: 16/9; }

/* ---------- 広告エリア ---------- */
.ad-slot { margin: 22px 0; border: 1px dashed var(--c-line-2); border-radius: var(--radius-sm); background: var(--c-surface-2); min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 16px; text-align: center; }
.ad-slot .tag { font: 500 9.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .12em; color: var(--c-ink-3); text-transform: uppercase; }
.ad-slot .hook { font: 400 11px/1.4 ui-monospace, Menlo, monospace; color: var(--c-ink-3); word-break: break-all; }
.ad-slot--sidebar { min-height: 240px; margin: 0; }

/* ---------- 目次 TOC ---------- */
.toc { margin: 22px 0; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface-2); overflow: hidden; }
.toc-toggle { display: flex; align-items: center; gap: 9px; width: 100%; padding: 14px 16px; font-size: var(--fz-sm); font-weight: 500; color: var(--c-ink); }
.toc-toggle .ic { color: var(--accent); display: grid; }
.toc-toggle .chev { margin-left: auto; transition: transform .22s ease; color: var(--c-ink-3); display: grid; }
.toc[data-open="false"] .chev { transform: rotate(-90deg); }
.toc-body { padding: 0 16px; max-height: 800px; overflow: hidden; transition: max-height .3s ease, padding .3s ease; }
.toc[data-open="false"] .toc-body { max-height: 0; }
.toc[data-open="true"] .toc-body { padding-bottom: 14px; }
.toc ol { counter-reset: toc; }
.toc li { position: relative; }
.toc li a { display: block; padding: 8px 0 8px 26px; font-size: var(--fz-sm); color: var(--c-ink-2); line-height: 1.5; transition: color .15s; }
.toc li.lv3 a { padding-left: 42px; font-size: var(--fz-xs); }
.toc li a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); position: absolute; left: 0; top: 8px; font-size: var(--fz-micro); color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.toc li.lv3 a::before { content: ""; }
.toc li.is-current > a { color: var(--accent); font-weight: 500; }

/* ---------- 記事本文 ---------- */
.article-body { font-size: var(--fz-body); line-height: var(--lh-body); color: var(--c-ink); }
.article-body h2 { font-size: var(--fz-h2); font-weight: 500; line-height: 1.5; margin: 34px 0 16px; padding-bottom: 11px; border-bottom: 2px solid var(--c-line); scroll-margin-top: calc(var(--header-h) + 60px); }
.article-body h2 .num { color: var(--accent); margin-right: 8px; font-variant-numeric: tabular-nums; }
.article-body h3 { font-size: var(--fz-h3); font-weight: 500; line-height: 1.5; margin: 26px 0 12px; padding-left: 11px; border-left: 3px solid var(--accent); scroll-margin-top: calc(var(--header-h) + 60px); }
.article-body p { margin: 0 0 17px; }
.article-body p .em { color: var(--accent); font-weight: 500; }
.article-body figure { margin: 18px 0; }
.article-body figure .ph, .article-body figure .media { border-radius: var(--radius-sm); }
.article-body figcaption { margin-top: 7px; font-size: var(--fz-xs); color: var(--c-ink-3); text-align: center; }

/* おすすめポイント */
.points { margin: 24px 0; background: var(--accent-soft); border-radius: var(--radius); padding: 20px 18px; }
.points h3 { display: flex; align-items: center; gap: 8px; font-size: var(--fz-h3); font-weight: 500; color: var(--accent); margin-bottom: 14px; }
.points ul { display: flex; flex-direction: column; gap: 12px; }
.points li { position: relative; padding-left: 28px; font-size: var(--fz-sm); line-height: 1.65; }
.points li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; background: var(--accent); color: var(--accent-ink); border-radius: 50%; display: grid; place-items: center; font-size: 10px; }

/* ---------- FANZA CTAブロック ---------- */
.cta-block { margin: 26px 0; border: 1px solid var(--c-line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); background: var(--c-surface); }
.cta-sample { position: relative; }
.cta-sample .ph, .cta-sample .media { aspect-ratio: 16/10; }
.cta-sample .badge { position: absolute; top: 11px; left: 11px; }
.cta-info { padding: 18px; }
.cta-info h3 { font-size: var(--fz-lead); font-weight: 500; line-height: 1.5; }
.cta-meta { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 16px; }
.cta-meta .r { display: flex; gap: 10px; font-size: var(--fz-sm); }
.cta-meta .k { color: var(--c-ink-3); flex: 0 0 80px; }
.cta-note { margin-top: 9px; font-size: var(--fz-micro); color: var(--c-ink-3); text-align: center; }
@media (min-width: 768px) {
  .cta-block { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
  .cta-sample .ph, .cta-sample .media { height: 100%; aspect-ratio: auto; }
  .cta-info { padding: 24px; display: flex; flex-direction: column; justify-content: center; }
}

/* ---------- 関連・シェア ---------- */
.related { margin-top: 36px; }
.share { display: flex; gap: 10px; margin: 26px 0 0; }
.share a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 13px; border-radius: 10px; font-size: var(--fz-sm); font-weight: 500; color: #fff; transition: opacity .15s; }
.share a:hover { opacity: .9; }
.share .x { background: #14171a; }
.share .line { background: #06c755; }
@media (min-width: 768px) { .share a { flex: 0 1 200px; } }

/* ---------- アーカイブ見出し ---------- */
.arc-head { margin-bottom: 18px; }
.arc-head .kicker { font-size: var(--fz-micro); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.arc-head h1 { font-size: var(--fz-h1); font-weight: 500; margin-top: 8px; }
.arc-head .desc { margin-top: 12px; font-size: var(--fz-sm); color: var(--c-ink-2); line-height: 1.8; max-width: 760px; }
.arc-head .count { margin-top: 12px; font-size: var(--fz-xs); color: var(--c-ink-3); }

/* ソート */
.sortbar { position: sticky; top: var(--header-h); z-index: 40; display: flex; gap: 7px; padding: 12px 0; margin-bottom: 8px; background: var(--c-glass-2); backdrop-filter: blur(12px); }
.sortbar .label { font-size: var(--fz-xs); color: var(--c-ink-3); align-self: center; margin-right: 4px; }
.sortbar a { font-size: var(--fz-xs); color: var(--c-ink-2); padding: 8px 15px; border-radius: 20px; background: var(--c-surface-2); transition: background .15s, color .15s; }
.sortbar a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); }

/* ページネーション */
.pager { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 30px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; font-size: var(--fz-sm); color: var(--c-ink-2); background: var(--c-surface-2); padding: 0 6px; }
.pager .current { background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.pager .dots { background: transparent; }

/* ---------- サイドバー widget ---------- */
.widget { background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 18px; margin-bottom: 22px; }
.widget-title { font-size: var(--fz-sm); font-weight: 500; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.widget-title .mark { width: 4px; height: 16px; border-radius: 3px; background: var(--accent); }
.pop-list { display: flex; flex-direction: column; }
.pop-item { display: grid; grid-template-columns: 26px 64px 1fr; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
.pop-item:last-child { border-bottom: none; }
.pop-item .pno { font-size: 16px; font-style: italic; font-weight: 500; color: var(--accent); text-align: center; }
.pop-item .thumb { border-radius: 6px; overflow: hidden; }
.pop-item .pt { font-size: var(--fz-xs); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.genre-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.genre-chips a { font-size: var(--fz-xs); color: var(--c-ink-2); background: var(--c-surface-2); padding: 7px 12px; border-radius: 20px; transition: background .15s, color .15s; }
.genre-chips a:hover { background: var(--accent); color: var(--accent-ink); }

/* ---------- ヒーロー（検索/トップ導入） ---------- */
.hero { padding: 28px 0 8px; }
.hero h1 { font-size: var(--fz-hero); font-weight: 500; line-height: 1.45; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-top: 12px; font-size: var(--fz-sm); color: var(--c-ink-2); line-height: 1.75; max-width: 680px; }

/* ---------- 年齢確認モーダル ---------- */
.age-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in oklch, var(--accent) 30%, #0c0c10), #08080b); }
.age-overlay[hidden] { display: none; }
.age-card { text-align: center; color: #f2f2f5; max-width: 360px; width: 100%; }
.age-card .glyph { width: 58px; height: 58px; border-radius: 15px; margin: 0 auto 18px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); font-size: 27px; font-weight: 500; box-shadow: 0 10px 30px -6px var(--accent-shadow); }
.age-card .a-name { font-size: 18px; font-weight: 500; letter-spacing: .1em; margin-bottom: 22px; }
.age-card .a-lead { font-size: var(--fz-sm); font-weight: 500; line-height: 1.6; margin-bottom: 12px; }
.age-card .a-fine { font-size: var(--fz-xs); color: #b6b6c0; line-height: 1.85; margin-bottom: 26px; }
.age-card .a-enter { display: block; width: 100%; background: var(--cta); color: var(--cta-ink); font-size: var(--fz-lead); font-weight: 500; padding: 16px; border-radius: 12px; box-shadow: var(--shadow-cta); transition: background .15s; }
.age-card .a-enter:hover { background: var(--cta-hover); }
.age-card .a-leave { display: inline-block; margin-top: 16px; font-size: var(--fz-xs); color: #9a9aa6; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- SP固定CTA ---------- */
.sp-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; padding: 11px 14px calc(11px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, var(--c-surface) 74%, rgba(0,0,0,0)); transform: translateY(140%); transition: transform .3s cubic-bezier(.2,.7,.3,1); }
.sp-cta.show { transform: translateY(0); }
.sp-cta .btn-cta { max-width: 560px; margin: 0 auto; }
@media (min-width: 1024px) { .sp-cta { display: none; } }

/* ---------- ページトップ ---------- */
.to-top { position: fixed; right: 16px; bottom: 84px; z-index: 850; width: 46px; height: 46px; border-radius: 50%; background: var(--c-surface); box-shadow: var(--shadow-lift); color: var(--accent); display: grid; place-items: center; opacity: 0; transform: translateY(10px) scale(.9); pointer-events: none; transition: opacity .25s, transform .25s; }
.to-top.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
@media (min-width: 1024px) { .to-top { bottom: 28px; } }
