/* ============================================================
   ぽちむち デザイントークン（共通CSS変数）
   ブランドカラー（コーラル系）: 濃色=ヘッダー等 / 中間色=見出し・強調・CTA / 淡色=バッジ・薄い背景
   ============================================================ */
:root {
  --color-brand-dark: #4a1b0c;
  --color-brand-mid: #d85a30;
  --color-brand-mid-hover: #c14a22;
  --color-brand-light: #f5c4b3;
  --color-brand-pale: #faece7;

  --color-bg: #ffffff;
  --color-bg-soft: #fffaf8;
  --color-text: #2b2320;
  --color-text-muted: #6b5c56;
  --color-border: #ecdcd3;

  --color-cta-bg: var(--color-brand-mid);
  --color-cta-bg-hover: var(--color-brand-mid-hover);
  --color-cta-text: #ffffff;

  --color-star: var(--color-brand-mid);

  --radius-card: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 2px 10px rgba(74, 27, 12, 0.08);
  --shadow-cta: 0 4px 12px rgba(216, 90, 48, 0.35);

  --font-sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic",
    Meiryo, "Noto Sans JP", system-ui, -apple-system, sans-serif;

  --content-width: 1000px;
}

/* ============================================================
   リセット・ベース
   ============================================================ */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}
img {
  max-width: 100%;
  height: auto;
}
a {
  color: var(--color-brand-mid);
}
a:hover {
  color: var(--color-brand-mid-hover);
}
h1,
h2,
h3,
h4 {
  color: var(--color-brand-dark);
  line-height: 1.4;
  margin: 1.7em 0 0.7em;
}
h1 {
  font-size: 1.6rem;
}
h2 {
  font-size: 1.3rem;
  border-bottom: 2px solid var(--color-brand-light);
  padding-bottom: 0.4rem;
}
h3 {
  font-size: 1.1rem;
}
p {
  margin: 0.8em 0;
}

/* ============================================================
   ヘッダー・ナビ
   ============================================================ */
.site-header {
  background: var(--color-brand-dark);
  color: #fff;
}
.site-header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
}
.brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff !important;
  text-decoration: none;
  letter-spacing: 0.03em;
}
.brand:hover {
  opacity: 0.9;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}
.site-nav a {
  color: var(--color-brand-light) !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-pill);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
}

.site-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}
/* 記事詳細ページの固定CTAバー分、本文末尾に余白を確保する（app/lib/render.php の $hasStickyCta） */
body.has-sticky-cta .site-main {
  padding-bottom: 5.5rem;
}

/* ============================================================
   トップページ：ヒーロー・最新記事カード
   ============================================================ */
.hero {
  text-align: center;
  padding: 2.5rem 1rem 2.25rem;
  background: linear-gradient(180deg, var(--color-brand-pale), var(--color-bg) 85%);
  border-radius: var(--radius-card);
  margin: 0 0 2rem;
}
.hero-eyebrow {
  color: var(--color-brand-mid);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0;
  font-size: 0.9rem;
}
.hero-title {
  font-size: 2.4rem;
  margin: 0.3rem 0;
  color: var(--color-brand-dark);
}
.hero-lead {
  color: var(--color-text-muted);
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}
.hero-cta {
  font-size: 1.1rem;
  padding: 1rem 2.2rem;
}

.post-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(74, 27, 12, 0.12);
}
.post-card-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}
.post-card-body {
  padding: 0.8rem 0.9rem 1rem;
}
.post-card-title {
  font-weight: 700;
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--color-text);
}
.post-card-score {
  margin: 0;
  font-size: 0.9rem;
}
.post-list-more {
  text-align: center;
}

/* ============================================================
   汎用CTAボタン（暖色・高コントラスト・タップしやすいサイズ）
   ============================================================ */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--color-cta-bg);
  color: var(--color-cta-text) !important;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: var(--radius-pill);
  text-decoration: none;
  min-height: 48px;
  box-shadow: var(--shadow-cta);
  transition: transform 0.08s ease, background 0.15s ease;
  cursor: pointer;
}
.cta-button:hover,
.cta-button:focus-visible {
  background: var(--color-cta-bg-hover);
  color: #fff !important;
  transform: translateY(-1px);
}
.cta-button:active {
  transform: translateY(0);
}
.cta-button--disabled {
  background: #c9beb9;
  color: #fff !important;
  box-shadow: none;
  cursor: not-allowed;
}
.cta-button--disabled:hover {
  background: #c9beb9;
  transform: none;
}

/* ============================================================
   汎用カード
   ============================================================ */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.preview-banner {
  background: #fff3cd;
  color: #664d03;
  border: 1px solid #ffe69c;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  font-weight: bold;
}
.preview-banner a {
  color: inherit;
  text-decoration: underline;
}

.actress-profile {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--color-bg-soft);
  border-radius: var(--radius-card);
}
.actress-photo {
  width: 200px;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius-card);
  flex-shrink: 0;
}
.actress-photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-brand-pale);
  color: var(--color-text-muted);
  font-weight: bold;
}
.actress-profile-table {
  border-collapse: collapse;
  width: 100%;
}
.actress-profile-table th,
.actress-profile-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 0.6rem 0.75rem;
  text-align: left;
}
.actress-profile-table th {
  color: var(--color-brand-dark);
  white-space: nowrap;
  width: 8rem;
}

.actress-featured-cta {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid var(--color-brand-light);
  border-radius: var(--radius-card);
  background: var(--color-brand-pale);
  text-align: center;
}
.actress-featured-label {
  font-weight: bold;
  margin: 0 0 0.5rem;
  color: var(--color-brand-dark);
}

.actress-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}
.actress-card {
  display: block;
  width: 140px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s ease;
}
.actress-card:hover {
  transform: translateY(-2px);
}
.actress-card-photo {
  width: 140px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.1s ease;
}
.actress-card:hover .actress-card-photo {
  box-shadow: 0 6px 16px rgba(74, 27, 12, 0.18);
}
.actress-card-name {
  margin: 0.5rem 0 0;
  font-weight: bold;
  text-align: center;
}

.work-info-table {
  border-collapse: collapse;
  margin: 1rem 0;
  width: 100%;
}
.work-info-table th,
.work-info-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 0.6rem 0.75rem;
  text-align: left;
}
.work-info-table th {
  color: var(--color-brand-dark);
  white-space: nowrap;
  width: 7rem;
}

.platforms-table th {
  color: var(--color-brand-dark);
}
.platforms-table td:nth-child(2) {
  font-weight: 700;
  color: var(--color-brand-mid);
}

/* 管理画面（public/css/admin.css）のライトボックスと同じ考え方を公開側にも適用 */
.zoomable-image {
  cursor: zoom-in;
}
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  z-index: 1000;
}
.lightbox-overlay.active {
  display: flex;
}
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  font-size: 2rem;
  line-height: 1;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}
.lightbox-prev {
  left: 1rem;
}
.lightbox-next {
  right: 1rem;
}

.dmm-sample-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.dmm-sample-images img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
}
.dmm-sample-movie iframe {
  max-width: 100%;
  border-radius: 6px;
}

/* ============================================================
   ランキングページ：カード型レイアウト（スマホは1カラム、デスクトップは横並びカード）
   ============================================================ */
.ranking-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.ranking-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.ranking-card-media {
  position: relative;
}
.ranking-card-thumb {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}
.ranking-card-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-brand-pale);
  color: var(--color-text-muted);
  font-weight: bold;
}
.rank-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: var(--color-brand-dark);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.rank-badge--top {
  background: var(--color-brand-mid);
}
.ranking-card-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.ranking-card-title {
  font-weight: 800;
  font-size: 1.05rem;
  margin: 0;
  color: var(--color-text);
}
.ranking-card-actress {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}
.ranking-card-score {
  margin: 0.1rem 0;
}
.ranking-card-score .stars {
  font-size: 1.1rem;
}
.ranking-card-comment {
  margin: 0.2rem 0 0.6rem;
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.7;
}
.ranking-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.4rem;
}
.ranking-card-price {
  margin: 0;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-brand-mid);
}
.ranking-card-cta {
  width: 100%;
}

@media (min-width: 640px) {
  .ranking-card {
    flex-direction: row;
  }
  .ranking-card-media {
    width: 220px;
    flex-shrink: 0;
  }
  .ranking-card-thumb {
    height: 100%;
    aspect-ratio: unset;
  }
  .ranking-card-footer {
    flex-wrap: nowrap;
  }
  .ranking-card-cta {
    width: auto;
    flex-shrink: 0;
  }
}

/* src/pages/ranking/index.astro の <style> をそのまま移植（女優個別ページの作品一覧で使用） */
.table-wrap {
  overflow-x: auto;
}
.ranking-table {
  width: 100%;
  border-collapse: collapse;
}
.ranking-table th,
.ranking-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 0.6rem 0.5rem;
  vertical-align: top;
  text-align: left;
}
.ranking-table th {
  color: var(--color-brand-dark);
}
.ranking-table img {
  display: block;
  border-radius: 6px;
}
.rank {
  font-weight: bold;
  text-align: center;
}
.title {
  font-weight: bold;
  margin: 0;
}
.actress {
  color: var(--color-text-muted);
  margin: 0.25rem 0 0;
}
.platforms {
  list-style: none;
  margin: 0;
  padding: 0;
}
.score {
  margin-left: 0.25rem;
  color: var(--color-brand-mid);
  font-weight: 700;
}
.stars {
  color: var(--color-star);
  letter-spacing: 0.05em;
}

/* src/components/ReviewCta.astro の <style> をそのまま移植（暖色・高コントラストCTAに更新） */
.review-cta {
  margin: 1.5rem 0;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-bg-soft);
  text-align: center;
}
.review-cta-label {
  margin: 0 0 0.75rem;
  font-weight: bold;
  color: var(--color-brand-dark);
}
.review-cta-buttons {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
}
.review-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-pill);
  background: var(--color-cta-bg);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-cta);
  transition: transform 0.08s ease, background 0.15s ease;
}
.review-cta-button:hover {
  background: var(--color-cta-bg-hover);
  transform: translateY(-1px);
}
.review-cta-button--disabled {
  background: #c9beb9;
  color: #fff;
  box-shadow: none;
  cursor: not-allowed;
}
.review-cta-button--disabled:hover {
  transform: none;
}

/* 結論：総合評価（SCORE:auto） */
.conclusion-score {
  font-size: 1.15rem;
  font-weight: 700;
}
.conclusion-score .stars {
  font-size: 1.3rem;
  margin-right: 0.4rem;
}
.conclusion-comment {
  color: var(--color-text);
}

/* ============================================================
   記事詳細ページ：本文（目次・見出し・表・画像）
   ============================================================ */
article {
  line-height: 1.9;
}
article > h1 {
  margin-top: 0;
}
article > time {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: -0.3rem 0 1.5rem;
}
article h2 {
  margin-top: 2.4em;
}
/* 「目次」セクション（記事冒頭の最初のul）をボックス化する */
article > ul:first-of-type {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1rem 1.5rem;
  margin: 1rem 0 2rem;
}
article > ul:first-of-type li {
  margin: 0.3rem 0;
}
article > ul:first-of-type a {
  text-decoration: none;
  font-weight: 600;
}
article > ul:first-of-type a:hover {
  text-decoration: underline;
}
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
}
article table th,
article table td {
  border-bottom: 1px solid var(--color-border);
  padding: 0.6rem 0.5rem;
  text-align: left;
}
article strong {
  color: var(--color-brand-dark);
}

/* サンプル画像ギャラリー・パッケージ画像：ホバーで軽く拡大、影で立体感を出す */
.zoomable-image {
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease;
}
.zoomable-image:hover {
  transform: scale(1.03);
}

/* ============================================================
   記事詳細ページ：画面下部固定CTAバー（離脱前に必ず購入導線を見せる）
   ============================================================ */
.sticky-cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 500;
  background: #fff;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 16px rgba(74, 27, 12, 0.14);
  padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
}
.sticky-cta-bar-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.sticky-cta-bar-info {
  min-width: 0;
}
.sticky-cta-bar-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-cta-bar-price {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-brand-mid);
}
.sticky-cta-bar-button {
  flex-shrink: 0;
  padding: 0.75rem 1.3rem;
  font-size: 0.95rem;
  white-space: nowrap;
}
