/* =========================================================
 * Global base
 * ======================================================= */

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto,
    'ヒラギノ角ゴ ProN', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP',
    sans-serif;
  background: #fafafa;
  color: #333;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* =========================================================
 * Layout / common components
 * ======================================================= */

.container {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 14px;
}

.site-header {
  background: #111;
  color: #fff;
  padding: 14px 18px;
  font-weight: 700;
}

.site-footer {
  background: #111;
  color: #fff;
  padding: 20px;
  text-align: center;
  margin-top: 40px;
}

/* index 用グリッド（作品一覧） */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* PCで3列固定 */
}

/* 画面幅が狭くなったときの調整 */
@media (max-width: 960px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* タブレット等で2列 */
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(1, minmax(0, 1fr)); /* スマホで1列 */
  }
}

/* カード（一覧） */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  overflow: hidden;
  transition: transform .1s ease;
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* 一覧サムネ（タイル） */
.card > a > img {
  display: block;
  width: 100%;
  height: 200px;        /* PC基準のタイル高さ */
  object-fit: cover;    /* 縦長でも横長でもトリミングして枠にフィット */
  border-radius: 8px 8px 0 0;
}

/* スマホは高さを少し低めに */
@media (max-width: 640px) {
  .card > a > img {
    height: 160px;
  }
}

.card h3 {
  font-size: 16px;
  line-height: 1.35;
  margin: 10px 12px 4px;
  /* 長いタイトルを2行で省略 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .meta {
  font-size: 12px;
  color: #666;
  margin: 0 12px 12px;
}

.card:hover {
  transform: translateY(-3px);
}

/* ボタン汎用 */
.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  background: #0d4de0;
  color: #fff;
  border: none;
  cursor: pointer;
  margin-right: 10px;
}

.btn:hover {
  filter: brightness(.96);
}

/* ログイン画面 */
.login {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.login-box {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .1);
  min-width: 280px;
}

.login-box h1 {
  font-size: 18px;
  margin: 0 0 12px;
}

.login-box input {
  width: 100%;
  padding: 10px;
  margin: 6px 0 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.login-box button {
  width: 100%;
}

/* 2カラム（本文＋サイドバー）
 * いったん廃止：すべて縦並びにする
 */
.flex.two {
  display: block;
}

/* =========================================================
 * ヘッダーナビ / タクソノミ
 * ======================================================= */

.top-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  overflow: auto;
  flex-wrap: wrap;
}

.top-nav a {
  color: #111;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap; /* ← 将来不要になるかも。これが長文を絶対に折り返させない原因 */
}

.top-nav a:hover {
  background: #f5f5f7;
}

.top-nav .spacer {
  flex: 0 0 20px;
}

.cat-nav {
  display: flex;
  gap: 10px;
  margin: 10px 0 24px;
  flex-wrap: wrap;
}

.pill {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: .9rem;
}

.pill:hover {
  background: #f3f4f7;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* タグ・人物・シリーズ等 */
.term-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 10px 0;
  list-style: none;
}

.badge {
  display: inline-block;
  min-width: 1.5em;
  padding: .15em .45em;
  margin-left: .25em;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: .8em;
  text-align: center;
}

.alpha-head {
  margin: 18px 0 6px;
  border-bottom: 1px dashed #ddd;
  padding-bottom: 4px;
}

.tax-desc {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin: 8px 0 18px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
}

/* ページャ */
.pager {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

/* =========================================================
 * 詳細ページ：ヒーロー / 情報
 * ======================================================= */

/* ヒーロー */
.fas-work-hero {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  margin-bottom: 24px;
}

.fas-work-hero .thumb img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  max-width: 100%;
}

.fas-work-hero .title {
  font-size: 1.35rem;
  margin: 0 0 4px;
}

.fas-work-hero .sub {
  color: #666;
  font-size: .9rem;
  margin: 0 0 6px;
}

.notice {
  font-size: 12px;
  color: #a00;
  margin: 6px 0 0;
}

.small {
  font-size: 18px;
  color: #666;
}

@media (max-width: 680px) {
  .fas-work-hero {
    grid-template-columns: 1fr;
    margin: 0 -4px 18px;
  }
  .fas-work-hero .thumb img {
    max-width: 260px;
    margin: 0 auto;
  }
}

/* 作品情報ボックス（価格／評価／シリーズなど） */
.fas-work-facts {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .06);
  margin: 0 0 24px;
  font-size: .95rem;
}

/* 作品情報・作品紹介の見出し */
.fas-work-sec-title {
  margin: 24px 0 12px;
  font-size: 20px;
  font-weight: 600;
  border-left: 4px solid #f15a24;
  padding-left: 8px;
}

/* 作品情報リスト */
.fas-work-facts-list {
  margin: 0;
  padding: 0;
}

.fas-work-facts-list .row {
  display: flex;
  align-items: flex-start;
  gap: 6px 10px;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

.fas-work-facts-list .row:last-child {
  border-bottom: none;
}

.fas-work-facts-list .row dt {
  flex: 0 0 auto;
  min-width: 4.5em;    /* ラベル部分の幅（固定 width は使わない） */
  margin: 0;
  font-weight: 600;
  font-size: .9rem;
  color: #666;
}

.fas-work-facts-list .row dd {
  flex: 1 1 auto;
  min-width: 0;                 /* 折り返し可能にする */
  margin: 0;
  font-size: .95rem;
  line-height: 1.6;
  word-break: break-word;       /* 日本語も含め折り返し */
  overflow-wrap: anywhere;      /* 英数字が長くても強制改行 */
}

.fas-work-facts-list .row dd a {
  text-decoration: none;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* 「紹介」テキストも fas-work-facts クラスでカード表示 */
p.fas-work-facts {
  margin-top: 8px;
  line-height: 1.9;
}

/* 作品紹介の本文 */
.fas-work-facts,
.fas-work-facts.small,
.fas-work-facts p,
p.fas-work-facts {
  font-size: 15px;
  line-height: 1.7;
  margin: 8px 0;
  word-break: break-word;
}

/* 通常の lead 段落 */
.fas-work-desc p,
.fas-work-facts p {
  margin-bottom: 14px;
}

/* スマホ向け作品情報調整 */
@media (max-width: 768px) {
  .fas-work-sec-title {
    font-size: 17px;
    margin: 20px 0 10px;
  }

  .fas-work-facts,
  p.fas-work-facts,
  .fas-work-facts.small {
    font-size: 14px;
    line-height: 1.6;
  }

  .fas-work-facts-list .row {
    flex-wrap: wrap;
    gap: 2px 6px;
  }

  .fas-work-facts-list .row dt {
    font-size: 13px;
  }

  .fas-work-facts-list .row dd {
    font-size: 13px;
  }
}

/* =========================================================
 * ギャラリー（サンプル画像）
 * ======================================================= */

.fdbi-section.fdbi-gallery {
  margin: 18px 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  padding: 14px;
}

.fdbi-h {
  font-size: 1.1rem;
  margin: 0 0 10px;
}

/* ギャラリー：1列縦並びに統一 */
.fdbi-gallery-grid {
  display: block;
}

/* 画像は元比率（width:100% / height:auto） */
.fdbi-gallery-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* サンプル動画 */
.fdbi-sample-movie {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 12px 0 16px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}

.fdbi-sample-movie iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* =========================================================
 * 関連作品エリア
 * ======================================================= */

.fdbi-section.fdbi-related {
  margin-top: 24px;
}

.fdbi-related-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr)); /* PCでもスマホでも最小1列 */
  gap: 12px;
}

/* 広い画面では列数を増やす */
@media (min-width: 600px) {
  .fdbi-related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .fdbi-related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.fdbi-related-item {
  margin: 0;
}

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

.fdbi-related-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4; /* 縦長サムネ前提 */
  overflow: hidden;
  border-radius: 8px;
  background: #f4f4f4;
}

.fdbi-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fdbi-related-title {
  margin: 8px 0 0;
  font-size: .92rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 480px) {
  .fdbi-related-list {
    gap: 10px;
  }
  .fdbi-related-title {
    font-size: .88rem;
  }
}

/* =========================================================
 * テーブル / ユーティリティ
 * ======================================================= */

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  border-bottom: 1px solid #eee;
  padding: 8px 6px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #fafafa;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.muted { color: #666; }
.hidden { display: none !important; }

/* =========================================================
 * レスポンシブ微調整（全体）
 * ======================================================= */

@media (max-width: 768px) {
  .container {
    max-width: 100%;
    padding: 12px 10px;
  }
}

/* =========================================================
 * 本編ボタン（ピンクストライプ＋本編バウンド）
 * ======================================================= */

.cta-pink {
  margin: 32px 0;
  display: flex;
  justify-content: center;
}

.cta-pink a {
  display: block;
  width: 100%;
  max-width: 900px;
  padding: 20px 16px;
  border-radius: 40px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: #fff;
  text-decoration: none;

  /* ストライプ背景 */
  background-image: repeating-linear-gradient(
    -45deg,
    #ff7890 0,
    #ff7890 14px,
    #ff6280 14px,
    #ff6280 28px
  );
  border: 3px solid #ffb3c4;
  box-shadow: 0 10px 20px rgba(0,0,0,.12);
  position: relative;
  overflow: hidden;
}

.cta-pink a:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* 「本編」だけバウンドさせる */
.cta-pink .cta-main {
  display: inline-block;
  margin: 0 .15em;
  animation: ctaBounce 1.2s infinite ease-in-out;
}

@keyframes ctaBounce {
  0%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-4px) scale(1.05);
  }
  70% {
    transform: translateY(0);
  }
}

/* 作品情報のリンクをボタン化 */
.fas-work-facts-list a {
  display: inline-block;
  padding: 6px 10px;
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 999px;
  color: #333;
  font-size: 0.9rem;
  text-decoration: none;
  margin: 4px 6px 4px 0;
  transition: background .15s ease, border-color .15s ease;
}

.fas-work-facts-list a:hover {
  background: #e9e9e9;
  border-color: #ccc;
}

/* =========================================================
 * 広告枠 (ad_1_html ～ ad_5_html)
 * ======================================================= */

.fas-ad {
  margin: 22px 0;
  text-align: center;
}

.fas-ad > *:first-child {
  margin-top: 0;
}

.fas-ad > *:last-child {
  margin-bottom: 0;
}

.fas-ad iframe,
.fas-ad img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* 購入前チェックランキング（作品）のバッジ処理 */
.rank-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #e60033;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 3;
}
.card {
  position: relative;
}