:root {
  --bg: #14141a;
  --surface: #1e1e26;
  --surface-2: #262630;
  --border: #33333f;
  --text: #e8e8ef;
  --muted: #9a9aab;
  --accent: #ff4d7d;
  --accent-hover: #ff6b93;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.8;
}

body.is-gated { overflow: hidden; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ---------- 年齢認証 ---------- */
#age-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 10, 14, 0.97);
}
/* display指定は[hidden]のUAスタイル(display:none)より詳細度が高く、
   これが無いとhidden属性を付けてもオーバーレイが消えない。 */
#age-gate[hidden] { display: none; }
.age-gate__box {
  max-width: 460px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
}
.age-gate__box h2 { margin-top: 0; }
.age-gate__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
#age-yes {
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
}
#age-yes:hover { background: var(--accent-hover); }
.age-gate__no { color: var(--muted); font-size: 0.9rem; }

/* ---------- ヘッダー / フッター ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header__title { font-size: 1.15rem; font-weight: bold; color: var(--text); }
.site-nav { display: flex; flex-wrap: wrap; gap: 20px; font-size: 0.92rem; }
.site-nav a { color: var(--muted); }

.site-footer {
  margin-top: 64px;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}
.site-footer p { margin: 6px 0; }
.site-footer__pr { font-size: 0.8rem; }

/* ---------- レイアウト ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
h1 { font-size: 1.6rem; line-height: 1.5; }
h2 { margin-top: 40px; font-size: 1.2rem; border-left: 4px solid var(--accent); padding-left: 12px; }
.lead { color: var(--muted); }
.breadcrumb { margin-bottom: 24px; font-size: 0.85rem; color: var(--muted); }

/* ---------- 一覧カード ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card__link { display: flex; flex: 1; flex-direction: column; color: inherit; }
.card__link:hover { text-decoration: none; }
/* 7/10 は ps.jpg の実際の縦横比(約0.70)。合わせておくとcoverでもほぼ切り取られない。 */
.card__img { display: block; width: 100%; aspect-ratio: 7 / 10; object-fit: cover; background: var(--surface-2); }
.card__body { display: flex; flex: 1; flex-direction: column; padding: 14px; }
.card__title {
  margin: 0 0 8px;
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 上方向のautoマージンで、出演者名から下をカード下端に寄せる。
   タイトルの行数がカードごとに違っても、名前・評価・日付の位置が揃う。
   名前は1行に丸めておかないと、折り返した分だけ行がずれる。 */
.card__cast {
  margin: auto 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.card__rating { color: #ffc93c; }
.card__count { margin-left: 4px; color: var(--muted); }

/* ---------- 作品詳細 ---------- */
/* align-items既定のstretchのままだと、画像がテキスト列の高さまで縦に引き伸ばされる。 */
.work__head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px; }
.work__img {
  width: 380px;
  max-width: 100%;
  height: auto;          /* 横長ジャケット・縦長カバーどちらでも原寸比のまま表示する */
  border-radius: 8px;
  background: var(--surface-2);
}
.work__summary { flex: 1 1 340px; min-width: 0; }
.work__summary h1 { margin-top: 0; }

.rating { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.rating__value { color: #ffc93c; font-size: 1.4rem; font-weight: bold; }
.rating__count { color: var(--muted); font-size: 0.85rem; }

.spec { width: 100%; margin-bottom: 24px; border-collapse: collapse; font-size: 0.88rem; }
.spec th, .spec td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.spec th { width: 7.5em; color: var(--muted); font-weight: normal; }

.tag {
  display: inline-block;
  margin: 0 4px 6px 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.8rem;
}
.tag:hover { background: var(--accent); color: #fff; text-decoration: none; }

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: bold;
}
.btn:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }

.note { margin: 8px 0 0; color: var(--muted); font-size: 0.78rem; }

.quote {
  margin: 0;
  padding: 16px 20px;
  border-left: 3px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}
.quote p { margin-top: 0; }
.quote cite { font-size: 0.8rem; font-style: normal; }

/* ---------- ジャンル / 出演者一覧 ---------- */
.taxonomy { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; padding: 0; list-style: none; }
.taxonomy li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.taxonomy .count { color: var(--muted); font-size: 0.8rem; }

@media (max-width: 600px) {
  .container { padding: 24px 16px; }
  .work__img { width: 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
}
