:root {
  --bg: #12131a;
  --bg-elev: #1b1d27;
  --bg-elev-2: #242734;
  --text: #e8e9f0;
  --text-dim: #9a9db0;
  --accent: #ff3d71;
  --accent-2: #ff7a3d;
  --line: #2e3140;
  --radius: 10px;
  --wrap: 1400px;
}

* { box-sizing: border-box; }

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 19, 26, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.logo {
  font-size: 19px; font-weight: 800; white-space: nowrap;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo:hover { opacity: .85; color: transparent; }

.search { display: flex; flex: 1; max-width: 520px; margin-left: auto; }
.search input {
  flex: 1; min-width: 0; padding: 8px 14px;
  background: var(--bg-elev-2); color: var(--text);
  border: 1px solid var(--line); border-right: 0;
  border-radius: 20px 0 0 20px; font-size: 14px; outline: none;
}
.search input:focus { border-color: var(--accent); }
.search button {
  padding: 8px 18px; background: var(--accent); color: #fff;
  border: 0; border-radius: 0 20px 20px 0; cursor: pointer; font-size: 14px; font-weight: 700;
}
.search button:hover { background: var(--accent-2); }

.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 22px; cursor: pointer; }

.site-nav { border-top: 1px solid var(--line); }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; overflow-x: auto; }
.site-nav a {
  display: block; padding: 10px 18px; font-size: 14px; font-weight: 600;
  color: var(--text-dim); white-space: nowrap; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- レイアウト ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; padding-top: 24px; padding-bottom: 48px; }
.main { min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 22px; margin: 0 0 6px; }
.lead { color: var(--text-dim); font-size: 14px; margin: 0; }
.empty { color: var(--text-dim); padding: 40px 0; text-align: center; }

/* ---------- カードグリッド ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px 14px;
}
.grid__ad { grid-column: 1 / -1; }

.card { display: flex; flex-direction: column; }
.card__thumb {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden;
  background: var(--bg-elev-2); border-radius: var(--radius);
}
.card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .card__thumb img { transform: scale(1.06); }

.card__badges { position: absolute; left: 6px; bottom: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.badge {
  padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 700;
  background: rgba(0, 0, 0, .7); color: #fff;
}
.badge--movie { background: var(--accent); }

.card__title {
  margin: 8px 0 4px; font-size: 13px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-dim); }
.card__actress { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__review { white-space: nowrap; }
.stars { color: #ffc247; letter-spacing: -1px; }
.card__review em { font-style: normal; }

/* ---------- ページ送り ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 36px 0 8px; }
.page {
  min-width: 38px; padding: 8px 12px; text-align: center; font-size: 14px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 6px;
}
.page:hover { border-color: var(--accent); color: var(--accent); }
.page--current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.page--gap { border: 0; background: none; color: var(--text-dim); }

/* ---------- 詳細ページ ---------- */
.detail__title { font-size: 20px; line-height: 1.5; margin: 0 0 16px; }
/* CTAボタンをファーストビューに残したいので、パッケージ画像は高さで頭打ちにする */
.detail__hero {
  border-radius: var(--radius); overflow: hidden; background: var(--bg-elev-2); margin-bottom: 20px;
  display: flex; justify-content: center;
}
.detail__hero img { width: auto; max-width: 100%; max-height: min(58vh, 460px); object-fit: contain; }

.cta { text-align: center; margin: 24px 0; }
.cta__note { font-size: 12px; color: var(--text-dim); margin: 8px 0 0; }

.btn {
  display: inline-block; padding: 12px 28px; border-radius: 8px;
  font-weight: 700; font-size: 15px; cursor: pointer; border: 0; text-align: center;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--ghost { background: var(--bg-elev-2); color: var(--text-dim); border: 1px solid var(--line); }
.btn--cta {
  width: 100%; max-width: 520px; padding: 16px 28px; font-size: 17px; color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 20px rgba(255, 61, 113, .3);
}
.btn--cta:hover { color: #fff; filter: brightness(1.08); }

.samples { margin: 32px 0; }
.samples h2, .detail__info h2, .related h2 { font-size: 17px; margin: 0 0 14px; padding-left: 10px; border-left: 3px solid var(--accent); }
.samples__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.samples__grid img { width: 100%; border-radius: 6px; }

.info-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.info-table th, .info-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.info-table th { width: 110px; color: var(--text-dim); font-weight: 600; white-space: nowrap; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 10px; background: var(--bg-elev-2); border: 1px solid var(--line); border-radius: 12px; font-size: 12px; }
.tag:hover { border-color: var(--accent); color: var(--accent); }

.related { margin-top: 36px; }

/* ---------- 用語一覧 ---------- */
.term-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.term {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 14px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 6px; font-size: 14px;
}
.term:hover { border-color: var(--accent); }
.term__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term__count { color: var(--text-dim); font-size: 12px; }

/* ---------- サイドバー ---------- */
.side-block { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.side-block h2 { font-size: 15px; margin: 0 0 12px; }
.side-block .tags { gap: 6px; }
.is-sticky { position: sticky; top: 130px; }

/* ---------- 広告枠 ---------- */
.ad { display: flex; justify-content: center; align-items: center; }
.ad--top, .ad--footerBanner { padding: 16px; }
.ad--placeholder {
  min-height: 90px; border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--text-dim); font-size: 12px; background: rgba(255, 255, 255, .015);
}
.ad--sidebarTop.ad--placeholder, .ad--sidebarSticky.ad--placeholder { min-height: 250px; }
.ad--inFeed.ad--placeholder { min-height: 120px; }
.ad--stickyBottom.is-fixed {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: var(--bg-elev); border-top: 1px solid var(--line); padding: 6px;
}
.ad--stickyBottom.ad--placeholder { min-height: 56px; }

/* ---------- 年齢確認 ---------- */
.age-gate {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(10, 11, 15, .97);
}
.age-gate[hidden] { display: none; }
.age-gate__box {
  max-width: 440px; width: 100%; text-align: center; padding: 32px 26px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px;
}
.age-gate__box h2 { margin: 0 0 12px; font-size: 20px; }
.age-gate__box p { color: var(--text-dim); font-size: 14px; margin: 0 0 24px; }
.age-gate__actions { display: flex; flex-direction: column; gap: 10px; }

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 80px; margin-top: 20px; text-align: center; }
.footer-links { display: flex; gap: 20px; justify-content: center; list-style: none; margin: 0 0 14px; padding: 0; flex-wrap: wrap; font-size: 13px; }
.footer-notice, .copyright { font-size: 12px; color: var(--text-dim); margin: 4px 0; }

/* ---------- 記事 ---------- */
.post { max-width: 760px; }
.post__head { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.post__head h1 { font-size: 24px; line-height: 1.5; margin: 0 0 8px; }
.post__head time { font-size: 13px; color: var(--text-dim); }

.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.post-list__item a {
  display: block; padding: 18px 20px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
}
.post-list__item a:hover { border-color: var(--accent); color: inherit; }
.post-list__item h2 { font-size: 16px; margin: 0 0 6px; line-height: 1.5; }
.post-list__item p { font-size: 13px; color: var(--text-dim); margin: 0 0 6px; }
.post-list__item time { font-size: 12px; color: var(--text-dim); }

.prose { font-size: 15px; line-height: 1.9; }
.prose h2 { font-size: 18px; margin: 32px 0 12px; padding-left: 10px; border-left: 3px solid var(--accent); }
.prose h3 { font-size: 16px; margin: 24px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin-bottom: 6px; }
.prose blockquote {
  margin: 0 0 16px; padding: 12px 16px;
  background: var(--bg-elev); border-left: 3px solid var(--line); color: var(--text-dim);
}
.prose code { padding: 2px 6px; background: var(--bg-elev-2); border-radius: 4px; font-size: .9em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.prose img { border-radius: var(--radius); margin: 0 0 16px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.prose th, .prose td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--bg-elev); font-weight: 600; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .is-sticky { position: static; }
}
@media (max-width: 720px) {
  .header-inner { height: 54px; gap: 10px; }
  .logo { font-size: 16px; }
  .search { max-width: none; }
  .search input { padding: 7px 12px; font-size: 16px; } /* iOSの自動ズーム防止に16px */
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 10px; }
  .card__title { font-size: 12px; }
  .detail__title { font-size: 17px; }
  .samples__grid { grid-template-columns: repeat(2, 1fr); }
  .page-head h1 { font-size: 19px; }
}
