/* 女優ページ（scripts/build-actress-pages.mjs が生成）専用。アプリ本体(style.css)とは独立させる */
:root {
  color-scheme: dark;
  font-family: "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ Pro W3", HiraginoSans-W3, "メイリオ", Meiryo, "ＭＳ Ｐゴシック", sans-serif;
  background: #000;
  color: #fff;
  --accent: #ff7a21;
  --muted: #8a8a8e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0 20px 88px;
  line-height: 1.95;
}

a {
  color: var(--accent);
}

.page {
  max-width: 960px;
  margin: 0 auto;
}

/* 年齢確認。同意済みは age-boot.js が :root[data-age-ok] を立てて即座に消す */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #000;
}

:root[data-age-ok="1"] .age-gate {
  display: none;
}

.age-card {
  width: min(100%, 360px);
  padding: 32px 24px;
  border: 1px solid #2d2d2f;
  border-radius: 24px;
  background: #111;
  text-align: center;
}

.age-card h1 {
  margin: 28px 0 16px;
  font-size: 1.5rem;
}

.age-actions {
  display: grid;
  gap: 12px;
  margin: 24px 0 20px;
}

.primary-button,
.secondary-button {
  display: grid;
  min-height: 52px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.secondary-button {
  border: 1px solid #3a3a3d;
  background: transparent;
  color: #fff;
}

.age-note {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.7;
}

.brand-logo {
  display: block;
  width: 132px;
  height: auto;
  margin: 0 auto;
}

.page-header {
  padding: 28px 0 8px;
}

.home-link {
  display: block;
  width: 132px;
  margin-bottom: 20px;
}

.person {
  display: flex;
  align-items: center;
  gap: 16px;
}

.face {
  flex: none;
  width: 96px;
  height: 96px;
  border: 2px solid #2d2d2f;
  border-radius: 50%;
  background: #111;
  object-fit: cover;
}

.person-name {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.page-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.follow-button {
  flex: none;
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

/* 押した後は静かにする。塗りを外して枠線だけ残す */
.follow-button.following {
  border-color: #4a4a4e;
  background: transparent;
  color: #d8d8dc;
}

.ruby {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

/* APIが持っている項目だけ出る。何も持っていない女優もいる */
.profile {
  width: min(100%, 420px);
  margin: 36px 0 0;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.profile caption {
  padding-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: left;
}

.profile th,
.profile td {
  padding: 10px 14px;
  border: 1px solid #26262a;
  text-align: left;
}

.profile th {
  width: 34%;
  background: #121214;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}

.lead {
  max-width: 44em;
  margin: 0 0 10px;
  color: #dcdce0;
  font-size: 0.95rem;
}

/* ステマ規制の表記。フッターの先頭に置く（legal/playbook.md 1章） */
.pr {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.genres {
  margin: 36px 0 0;
  color: var(--accent);
  font-size: 0.82rem;
}

/* 手書きの紹介文。content/actress/<id>.txt がある女優にだけ出る */
.intro {
  display: flow-root;
  max-width: 44em;
  margin: 36px 0 0;
  color: #dcdce0;
  font-size: 1.02rem;
}

.intro h2 {
  margin: 0 0 18px;
  font-size: 1.18rem;
}

.intro p {
  margin: 0 0 1.5em;
}

/* 最後の段落のmarginが次のブロックの間隔に足されて、そこだけ広くなる */
.intro > :last-child {
  margin-bottom: 0;
}

/* txtの ~ここ~ が変換される（build-actress-pages.mjs の decorate） */
.intro .accent {
  color: var(--accent);
  font-weight: 700;
}

/* 本文の強調は色だけ。太字も下線も付けない（見出しの女優名は太字のまま） */
.intro p .accent,
.intro li .accent {
  font-weight: inherit;
}

.intro-points {
  margin: 0 0 1.8em;
  font-size: 0.94rem;
  padding: 16px 20px 16px 36px;
  border-left: 3px solid var(--accent);
  background: #131316;
  border-radius: 0 8px 8px 0;
  color: #fff;
}

.intro-points li {
  margin: 5px 0;
}

.reel-link {
  display: grid;
  justify-items: center;
  margin: 36px 0;
}

/* 年齢確認の primary-button と同じ形。幅は内容ぶんに留める */
.reel-link a {
  display: inline-grid;
  min-height: 48px;
  padding: 0 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.genres span {
  margin-right: 10px;
  white-space: nowrap;
}

/* パッケージ画像(ps.jpg)は147x200しかないので、列幅もそれに合わせる。広げるとぼやける */
.works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(147px, 1fr));
  gap: 28px 18px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.work-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.work img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #111;
  aspect-ratio: 147 / 200;
  object-fit: cover;
}

.work-title {
  display: -webkit-box;
  margin-top: 8px;
  overflow: hidden;
  font-size: 0.84rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* 残りの作品。JSを使わず<details>で開閉する */
.more-works {
  margin: 36px 0 0;
  text-align: center;
}

.more-works summary {
  display: inline-grid;
  min-height: 44px;
  padding: 0 24px;
  place-items: center;
  border: 1px solid #3a3a3d;
  border-radius: 999px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

/* Safariは::-webkit-details-markerを別に持つ。両方消さないと三角が残る */
.more-works summary::-webkit-details-marker {
  display: none;
}

.more-works .works {
  margin-top: 28px;
}

/* 作風の近い4人。works と footer の間 */
.see-also {
  margin: 56px 0 0;
}

.see-also h2 {
  margin: 0 0 18px;
  font-size: 1.05rem;
}

.rec-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rec-cards a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid #252527;
  border-radius: 14px;
  background: #111;
  color: #fff;
  font-size: 0.82rem;
  text-align: center;
  text-decoration: none;
}

/* 名前だけアクセント色。カード全体は白のままにする */
.rec-cards span {
  color: var(--accent);
}

.rec-cards img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #29292c;
}

/* 4列だとカード最小幅90px×4＋隙間で375pxを超えて横スクロールが出る */
@media (max-width: 520px) {
  .rec-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 女優一覧ページ(actress/index.html) */
/* 行見出し。356行あるので、スクロール中も今どの行かが分かるよう上に貼り付ける */
.kana-head {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 28px 0 0;
  padding: 10px 0 8px;
  background: #000;
  color: var(--accent);
  font-size: 1.05rem;
}

.actress-index {
  margin: 0;
  padding: 0;
  list-style: none;
}

.actress-index li {
  border-bottom: 1px solid #222;
  font-size: 0.92rem;
}

/* 行のどこを押しても飛べるよう、リンクを行いっぱいに広げる */
.actress-index a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: #fff;
  text-decoration: none;
}

.actress-index img {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #29292c;
}

/* 別名義つきの名前は長い。かなを次の行に落として折り返す */
.actress-index .name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.ruby-inline {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.actress-index .count {
  flex: none;
  color: var(--muted);
  font-size: 0.8rem;
}

.page-footer {
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid #222;
  color: var(--muted);
  font-size: 0.8rem;
}

.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.credit,
.owner {
  margin: 8px 0;
}

/* 上に戻るボタン。アプリ本体の #scroll-top-button と同じ見た目・同じ右下 */
.scroll-top {
  position: fixed;
  z-index: 20;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(24 24 27 / 88%);
  backdrop-filter: blur(16px);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 読み込みに失敗した画像（js/broken-image.js）。枠は残して中身だけ消す */
.is-broken {
  visibility: hidden;
}
