/* ===================================================================
   パケと中身、合ってる？  共通スタイルシート
   index.html と item/<id>.html（詳細ページ）で共有する。
   =================================================================== */

/* ── リセット & 変数 ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #f8f3e8;
  --bg-card:    #ffffff;
  --text:       #2c2416;
  --text-muted: #7a6a50;
  --accent:     #8b6914;
  --accent-lt:  #c9a84c;
  --border:     #e2d9c8;
  --cta:        #c44545;
  --cta-hover:  #a03434;
  --badge-match:  #2e7d32;
  --badge-slight: #e65100;
  --badge-large:  #b71c1c;
  --font-serif: Georgia, "Noto Serif JP", "游明朝", "YuMincho", serif;
  --font-sans:  "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --radius:     8px;
  --shadow:     0 2px 12px rgba(44, 36, 22, 0.08);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
}

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

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

/* ── 年齢確認ゲート ──────────────────────────────── */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 15, 8, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.age-gate__box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.age-gate__icon { font-size: 2.5rem; margin-bottom: 0.75rem; color: var(--accent); }

.age-gate__title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.age-gate__text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.8;
}

.age-gate__actions { display: flex; flex-direction: column; gap: 0.75rem; }

.age-gate__btn {
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.age-gate__btn:active { transform: scale(0.98); }

.age-gate__btn--yes { background: var(--cta); color: #fff; font-weight: 600; }
.age-gate__btn--yes:hover { background: var(--cta-hover); }

.age-gate__btn--no {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.age-gate__btn--no:hover { background: var(--bg); }

.age-gate__note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* ── サイトヘッダー ──────────────────────────────── */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 1.25rem 1.25rem;
  text-align: center;
}

.site-header__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.site-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.site-title a { color: inherit; }
.site-title a:hover { text-decoration: none; }

.site-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.4rem; }

/* ── メインコンテンツ ─────────────────────────────── */
.content { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

.content__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

/* ── ジャンル絞り込みバー ─────────────────────────── */
.filter-bar { margin-bottom: 1.75rem; }

.filter-bar__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.filter-bar__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.filter-chip {
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-family: var(--font-sans);
}
.filter-chip:hover { border-color: var(--accent-lt); }
.filter-chip.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.filter-chip__count { opacity: 0.6; margin-left: 0.25rem; font-size: 0.68rem; }

/* ── セクション（セール枠 / 実力枠） ───────────────── */
.section { margin-bottom: 2.5rem; }
.section.is-empty { display: none; }
.section__head { margin-bottom: 1.25rem; }

.section__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  border-left: 4px solid var(--accent);
  padding-left: 0.7rem;
}
.section--sale .section__title { border-left-color: var(--cta); }

.section__count { font-size: 0.8rem; font-weight: 400; color: var(--text-muted); }

.section__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  padding-left: 0.95rem;
}

.section__empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 1.5rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ── カードグリッド ──────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

/* ── カード ─────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 24px rgba(44, 36, 22, 0.14); }
.card.is-hidden { display: none; }

.card__header { padding: 0.9rem 1rem 0.5rem; display: flex; align-items: flex-start; gap: 0.5rem; }

/* 総合順位チップ */
.card__rank {
  flex-shrink: 0;
  min-width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 0.05rem;
}
.card__rank::before { content: ""; }

.card__title {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.45;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__title a { color: inherit; }

/* [STEP2] バッジ */
.badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 0.1rem;
}
.badge--match  { background: #e8f5e9; color: var(--badge-match); }
.badge--slight { background: #fff3e0; color: var(--badge-slight); }
.badge--large  { background: #ffebee; color: var(--badge-large); }

.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  padding: 0 1rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.card__maker::before { content: ""; }
.card__date { color: var(--text-muted); }

.card__discount {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: var(--cta);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* キャンペーン（セール名＋終了日）*/
.card__campaign {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0 1rem 0.5rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.72rem;
  background: #fbeceb;
  border-left: 3px solid var(--cta);
  border-radius: 0 4px 4px 0;
}
.campaign__title { color: var(--cta-hover); font-weight: 700; }
.campaign__until { color: var(--text-muted); white-space: nowrap; }

.card__price { margin-left: auto; display: flex; align-items: center; gap: 0.4rem; }

.price__list { font-size: 0.72rem; color: var(--text-muted); text-decoration: line-through; }
.price__sale { font-size: 0.9rem; font-weight: 700; color: var(--cta); }
.price__normal { font-size: 0.88rem; font-weight: 600; color: var(--text); }

.card__actress {
  font-size: 0.75rem;
  color: var(--accent);
  padding: 0 1rem 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── メタ情報（失敗回避の判断材料）──────────────── */
.card__info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0 1rem 0.6rem;
}

.info__item {
  font-size: 0.72rem;
  line-height: 1.4;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-muted);
  white-space: nowrap;
}

.info__review { color: var(--text); background: #fdf6e3; }
.info__stars { color: var(--accent-lt); letter-spacing: 0.02em; margin-right: 0.2rem; }
.info__num { font-weight: 700; }
.info__cnt { color: var(--text-muted); }

.info__review--low { background: #ffebee; }
.info__review--low .info__stars { color: var(--badge-large); }

.info__noreview { color: var(--badge-slight); background: #fff3e0; }
.info__movie { color: var(--accent); background: #f0ead6; font-weight: 600; }

/* ── 比較エリア ──────────────────────────────────── */
.card__comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.card__fig { background: var(--bg-card); padding: 0; margin: 0; }
.card__fig--wide { grid-column: 1 / -1; }

.card__fig figcaption {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg);
  text-align: center;
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.card__fig img { width: 100%; height: 200px; object-fit: cover; object-position: top center; }

.card__no-sample {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem;
}

/* ── サンプルストリップ ──────────────────────────── */
.card__strip {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.card__strip img { flex-shrink: 0; width: 120px; height: 80px; object-fit: cover; object-position: top; }

/* ── カードフッター ──────────────────────────────── */
.card__footer { padding: 0.75rem 1rem; margin-top: auto; display: flex; flex-direction: column; gap: 0.5rem; }

.card__btn {
  display: block;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.1s;
}
.card__btn:active { transform: scale(0.98); }
.card__btn:hover { text-decoration: none; }

.card__btn--detail { background: var(--accent); color: #fff; }
.card__btn--detail:hover { background: #6f540f; }

.card__btn--fanza { background: var(--cta); color: #fff; }
.card__btn--fanza:hover { background: var(--cta-hover); }

/* ── サイトフッター ──────────────────────────────── */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.9;
}
.site-footer a { color: var(--accent); }
.footer__legal { font-size: 0.72rem; margin-top: 0.25rem; }

/* ===================================================================
   詳細ページ（ダッシュボード）
   =================================================================== */
.detail { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem 4rem; }

.detail__back { font-size: 0.85rem; display: inline-block; margin-bottom: 0.75rem; }

.detail__title {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.detail__meta .price__sale { font-size: 1rem; }

/* hero: パッケージ vs サンプル① */
.detail-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
.detail-hero figure {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.detail-hero figcaption {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg);
  text-align: center;
  padding: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.detail-hero img { width: 100%; height: auto; }

/* ダッシュボードのグリッド */
.dash {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
  align-items: start;
}
.dash__panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.25rem;
  box-shadow: var(--shadow);
}
.dash__panel--wide { grid-column: 1 / -1; }

.dash__title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.dash__note { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.7rem; }

/* 指標カード */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.75rem; }
.metric { text-align: center; padding: 0.4rem; }
.metric__value { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.metric__value--alert { color: var(--cta); }
.metric__value--good  { color: var(--badge-match); }
.metric__label { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }
.metric__stars { font-size: 1.1rem; color: var(--accent-lt); letter-spacing: 0.04em; }

/* 価格内訳バー */
.pricebars { display: flex; flex-direction: column; gap: 0.7rem; }
.pricebar__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.78rem; margin-bottom: 0.2rem; gap: 0.5rem; }
.pricebar__type { font-weight: 600; color: var(--text); }
.pricebar__nums { color: var(--text-muted); }
.pricebar__nums .now { color: var(--cta); font-weight: 700; }
.pricebar__off { color: var(--cta); font-weight: 700; font-size: 0.72rem; margin-left: 0.3rem; }
.pricebar__track { position: relative; height: 0.85rem; background: var(--bg); border-radius: 4px; overflow: hidden; }
.pricebar__fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent-lt); border-radius: 4px; }
.pricebar__fill--sale { background: var(--cta); }

/* タグ */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-group { margin-bottom: 0.75rem; }
.tag-group:last-child { margin-bottom: 0; }
.tag-group__label { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.35rem; font-weight: 600; }
.tag {
  font-size: 0.75rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
a.tag:hover { border-color: var(--accent); text-decoration: none; }
.tag--genre { background: #fdf6e3; }

/* 女優の出演傾向比較 */
.profile-bars { display: flex; flex-direction: column; gap: 0.55rem; }
.pbar__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.78rem; margin-bottom: 0.15rem; gap: 0.5rem; }
.pbar__name { color: var(--text); }
.pbar__badge { font-size: 0.66rem; font-weight: 700; color: #fff; background: var(--accent); padding: 0.05rem 0.35rem; border-radius: 3px; }
.pbar__pct { color: var(--text-muted); }
.pbar__track { height: 0.8rem; background: var(--bg); border-radius: 4px; overflow: hidden; }
.pbar__fill { height: 100%; background: var(--accent-lt); border-radius: 4px; }
.pbar.is-in-work .pbar__fill { background: var(--accent); }
.profile-summary {
  font-size: 0.82rem;
  margin-bottom: 0.9rem;
  padding: 0.55rem 0.7rem;
  background: var(--bg);
  border-radius: var(--radius);
  line-height: 1.6;
}
.profile-summary strong { color: var(--accent); }

/* 全サンプルギャラリー */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; }
.gallery a { display: block; }
.gallery img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.gallery__pkg img { border: 2px solid var(--accent); }
.gallery__cap { font-size: 0.65rem; color: var(--text-muted); text-align: center; margin-top: 0.1rem; }

/* パッケージ一致度判定パネル（STEP2） */
.match-panel { border-top: 3px solid var(--border); }
.match-panel--match  { border-top-color: var(--badge-match); }
.match-panel--slight { border-top-color: var(--badge-slight); }
.match-panel--large  { border-top-color: var(--badge-large); }
.match-panel__result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.match-panel__result .badge {
  font-size: 1rem;
  padding: 0.3rem 0.85rem;
  border-radius: 6px;
}
.match-panel__score { font-size: 0.8rem; color: var(--text-muted); }
.match-panel__desc  { font-size: 0.88rem; color: var(--text); line-height: 1.65; }

/* 詳細ページの最終CTA */
.detail-cta { text-align: center; margin-top: 1rem; }
.detail-cta__btn {
  display: inline-block;
  background: var(--cta);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.9rem 2.5rem;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.1s;
}
.detail-cta__btn:hover { background: var(--cta-hover); text-decoration: none; }
.detail-cta__btn:active { transform: scale(0.98); }
.detail-cta__note { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ── レスポンシブ ────────────────────────────────── */
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .card__comparison { grid-template-columns: 1fr 1fr; }
  .card__fig img { height: 160px; }
  .site-title { font-size: 1.4rem; }
  .age-gate__box { padding: 2rem 1.25rem; }
}

@media (max-width: 700px) {
  .detail-hero { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .card__comparison { grid-template-columns: 1fr; }
}
