/* =============================================================
   base.css
   リセット・基本スタイル・レイアウト骨格
   ============================================================= */

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

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

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

ul, ol {
  list-style: none;
}

/* ─── 基本スタイル ─── */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: #E5E5E5;  /* コンテナ外の背景（PCで見えるグレー） */
  font-family: var(--font-ui);
  font-size: var(--text-grid-title);  /* 14px */
  font-weight: var(--fw-regular);
  color: var(--color-text);
  line-height: var(--lh-grid-title);  /* 20px */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── メインコンテナ（スマホ幅 中央寄せ固定） ─── */
.container {
  max-width: var(--screen-max);  /* 480px */
  margin: 0 auto;
  background: var(--color-bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ─── オーバーレイメニュー ─── */
.overlay-menu {
  position: fixed;
  inset: 0;
  background: rgba(255, 251, 241, 0.98);  /* --color-bg-warm */
  z-index: calc(var(--z-header) + 10);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  padding: 60px 0 40px;
}

.overlay-menu.is-open {
  transform: translateX(0);
}

.menu-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-black);
}

.menu-container {
  padding: 0 var(--content-pad);
}

.main-menu {
  list-style: none;
}

.main-menu li {
  border-bottom: 1px solid var(--color-border);
}

.main-menu li a {
  display: block;
  padding: 16px 0;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: var(--fw-medium);
  color: var(--color-black);
  text-decoration: none;
}

/* ─── コンテンツ内パディング ─── */
.content-pad {
  padding-left: var(--content-pad);
  padding-right: var(--content-pad);
}

/* ─── セクション区切り ─── */
.section {
  padding-bottom: 32px;
}

/* ─── セクション行見出し（あ行・か行 等） ─── */
.section-heading {
  font-family: var(--font-ui);
  font-size: var(--text-section-sub);  /* 18px */
  font-weight: var(--fw-medium);
  color: var(--color-black);
  padding: 35px var(--content-pad) 0;
}

/* ─── ページタイトル（大） ─── */
.page-title {
  font-family: var(--font-ui);
  font-size: var(--text-page-title);  /* 24px */
  font-weight: var(--fw-medium);
  color: var(--color-black);
  text-align: center;
}

/* ─── 区切り線 ─── */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: 0 var(--content-pad);
}

/* ─── アイテム間区切り線（作品一覧・女優一覧） ─── */
.item-divider {
  width: var(--list-divider-w);  /* 100px */
  height: 1px;
  background: var(--color-border);
  margin: 0 auto;
}

/* ─── ページ上部余白（固定ヘッダー60px） ─── */
.page-body {
  padding-top: var(--header-h);
}

/* ─── PR表記バー ─── */
.pr-bar {
  text-align: center;
  font-size: var(--text-actress-ruby-d);  /* 12px */
  color: var(--color-text-muted);
  padding: 6px var(--content-pad);
  background: var(--color-bg-warm);
}

/* ─── 年齢確認モーダル（Figma "18" フレーム準拠） ─── */
#age-modal { display: none; }
html.js #age-modal { display: flex; }

/* 全画面白背景 */
.age-modal {
  position: fixed;
  inset: 0;
  background: #ffffff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: 0 20px;
}

/* コンテンツエリア */
.age-modal-content {
  width: 100%;
  max-width: 335px;
  background: none;
  padding: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ロゴ: 90×90px（Figma 実測値・矩形表示） */
.age-modal-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
}

/* 「今夜のリスト」 — 12px Medium（Figma y=135） */
.age-modal-title {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: var(--fw-medium);
  color: #000000;
  margin: 0 0 4px;
  line-height: 1.4;
}

/* 「Tonight's List」ロゴタイプ画像（Figma y=159） */
.age-modal-en {
  display: block;
  width: 168px;
  height: 38px;
  margin: 0 auto 42px;
  object-fit: contain;
}

/* 本文（Figma y=217、14px Regular） */
.age-modal-text {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: var(--fw-regular);
  color: #333333;
  line-height: 24px;
  margin: 0 0 32px;
}

/* ボタン共通（角なし） */
.btn-age {
  display: block;
  width: var(--btn-w);           /* 250px */
  padding: var(--btn-pad-y) var(--btn-pad-x);  /* 8px 30px */
  border-radius: 0;
  font-size: var(--text-btn);    /* 16px */
  font-family: var(--font-btn);
  line-height: var(--lh-btn);    /* 24px */
  min-height: 44px;
  margin-bottom: 14px;
  cursor: pointer;
  border: none;
  text-align: center;
}

/* 「はい」: 黒背景 + 白文字 */
.btn-yes {
  background: #000000;
  color: #FFFFFF;
}

/* 「いいえ」: ゴーストボタン（黒枠 + 黒文字） */
.btn-no {
  background: transparent;
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.55);
}

/* 注記（Figma y=428、12px Regular） */
.age-modal-notice {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: var(--fw-regular);
  color: #333333;
  margin-top: 8px;
  line-height: 24px;
}

/* noscript フォールバック */
.age-form-wrap {
  min-height: 100vh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.age-form {
  width: 100%;
  max-width: 335px;
  background: none;
  padding: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* body スクロール禁止（モーダル・メニュー開時） */
body.is-locked {
  overflow: hidden;
}

/* ─── ライトボックス ─── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox-img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  display: block;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  color: var(--color-white);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev  { top: 50%; transform: translateY(-50%); left: 4px; font-size: 40px; }
.lightbox-next  { top: 50%; transform: translateY(-50%); right: 4px; font-size: 40px; }
