@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/* affiliateボタン */
.cta-button {
  display: block;
  width: 85%;
  background-color: #8B1E3F; 
  color: #EAF4FF;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  padding: 1em;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  margin: 20px auto;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
  background-color: #6E162F;
  color: #ffffff; /* ホバー時だけ白で締めるのも可 */
  transform: scale(1.02);
}

/* タイトル部分：省略処理 */
.cta-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.4;
  margin-bottom: 0.3em;
  -webkit-line-clamp: 2; /* デフォルトはスマホ用：3行 */
  text-decoration: underline;  /* 下線を追加 */
  text-underline-offset: 3px;  /* 下線を少し離す */
  position: relative;
}

/* PCでは2行に制限 */
/* @media (min-width: 768px) {
  .cta-title {
    -webkit-line-clamp: 2;
  }
} */

/* 視聴ラベル部分 */
.cta-label {
  display: block;
  font-size: 0.9em;
  opacity: 0.9;
  margin-top: 0.1em;
}

/* affiliateボタン */

/* catch画像 */
.catch-image {
  width: 70%;
  height: auto;
  display: block;       /* インライン画像をブロック化 */
  margin: 0 auto;       /* 左右マージンを自動で揃えて中央へ */
}

@media (max-width: 768px) {
  .catch-image {
    width: 100%;
  }
}

/* catch画像 */




/* 作品概要テーブル */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* 幅の固定化ポイント */
  margin: 20px 0;
  font-size: 1em;
}

.custom-table td {
  border: 1px solid #ccc;
  padding: 10px;
  vertical-align: top;
  word-wrap: break-word; /* 長文対策 */
}

.custom-table td:first-child {
  width: 20%;
  background-color: #f9f9f9;
  font-weight: bold;
}

.custom-table td:last-child {
  width: 80%;
}

.comment-box-labeled {
  position: relative;
  border: 2px solid #2C3E50;
  padding: 20px 16px 16px;
  margin: 30px 0;
  border-radius: 6px;
  background-color: #f9f9f9;
  color: #333;
  font-size: 0.95em;
}

.comment-box-labeled::before {
  content: attr(data-label); /* ラベルの文字をdata属性から取得 */
  position: absolute;
  top: -15px;
  left: 12px;
  background-color: #2C3E50;
  color: white;
  padding: 2px 10px;
  font-size: 0.8em;
  border-radius: 4px;
  white-space: nowrap;
}

/* 各行（画像＋文字） */
.comment-item {
  display: flex;
  align-items: center;

  gap: 12px;              /* ← 横方向：画像と文字の間 */
  margin-bottom: 10px;    /* ← 縦方向：行と行の間 */

  text-decoration: none;
  color: inherit;
}

/* 最後の行だけ余白不要なら */
.comment-item:last-of-type {
  margin-bottom: 6px;
}

/* 画像サイズ */
.comment-item img {
  width: 100px;
  height: auto;
  display: block;
}

/* テキスト */
.comment-item span {
  line-height: 1.5;
}

/* 下部リンク */
.comment-footer {
  text-align: right;
  margin-top: 8px;
}

.comment-footer a {
  font-size: 13px;
  color: #005488;
  text-decoration: none;
}

.comment-footer a:hover {
  text-decoration: underline;
}

/* 作品概要テーブル */


/* 紹介文のボックス */
.intro-box {
  background-color: #f6f6f6; /* 薄いグレー背景 */
  padding: 1.5em;
  border-left: 4px solid #223a5e; /* 濃い目のネイビー */
  margin-top: -1.5em;
  border-radius: 4px;
}

.intro-text {
  color: #333;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1em;
}

.intro-link {
  display: inline-block;
  background-color: #7b1e3a; /* ワインカラー */
  color: #fff;
  text-decoration: none;
  padding: 0.6em 1.2em;
  border-radius: 4px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.intro-link:hover {
  transform: scale(1.05);
  background-color: #8f2545; /* 少し明るめのワイン */
  color: #fff; /* ← これを追加 */
}
/* 紹介文のボックス */

/* セパレーター */
.separator {
  border-top: 2px dashed #bbb; /* 点線に */
  margin: 1.5em 0;
  width: 100%;
}
/* セパレーター */

/* セクションタイトル */
.section-title {
/*   text-align: center; */
  font-size: 2rem;
  font-weight: bold;
  color: #223a5e; /* 濃いめのネイビー */
  margin: 2em 0;
  padding: 0.5em 0;
  position: relative;
}

.section-title::before,
.section-title::after {
  content: "";
  display: block;
  height: 2px;
  background-color: #223a5e;
  width: 100%;
  position: absolute;
  left: 0;
}

.section-title::before {
  top: 0;
}

.section-title::after {
  bottom: 0;
}
/* セクションタイトル */

/* 女優リスト */
.actress-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1em;
}

.actress-item {
  text-align: center;

}

.actress-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block; 
}

.actress-info {
  margin-top: 0em; /* 距離を好みで調整。0もOK */
}

.actress-info p {
  font-weight: 600;
  margin: 0em;
  color: #333;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  margin-top: -2em;
}

.link {
  font-size: 0.85rem;
  color: #7b1e3a;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

/* 女優リスト */

/* プロフィールテープル */
.profile-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.profile-table td {
  border: 1px solid #ddd;
  padding: 8px;
}

.face {
  width: 120px;
  text-align: center;
}

.face-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* プロフィールテープル */

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
　.custom-table {
    font-size: 0.95em;
  }
  .custom-table td:first-child {
    width: 25%;
  }
  .custom-table td:last-child {
    width: 75%;
  }
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
  .custom-table {
    font-size: 0.9em;
  }
  .custom-table td {
    padding: 8px;
  }	
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
/*   .custom-table,
  .custom-table colgroup,
  .custom-table col,
  .custom-table tbody,
  .custom-table tr {
    display: block;
    width: 100%;
  }

  .custom-table tr {
    margin-bottom: 12px;
    border-bottom: 1px solid #ccc;
  }

  .custom-table td {
    display: inline-block;
    width: 100%;
    border: none;
    padding: 6px 0;
  }

  .custom-table td:first-child {
    font-weight: bold;
    background-color: transparent;
    margin-bottom: 2px;
  }

  .custom-table td:last-child {
    font-weight: normal;
  } */

}


/* 全体ラップ */
.meta-taxonomies {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 15px;
    font-size: 14px;
}

/* タクソノミーの1ブロック（例：ジャンル / プレイ / 属性） */
.tax-block {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    background: #eff4f9;
    border: 1px solid #cfd7e3;
    padding: 6px 10px;
    border-radius: 6px;
}

/* 左側の分類ラベル（ジャンル, 衣装, 契約など） */
.tax-label {
    font-weight: 600;
    background: #0f4c81;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

/* 個々のタームタグ */
.tax-item {
    display: inline-block;
    padding: 3px 8px;
    background: #fff;
    color: #0f4c81;
    border: 1px solid #0f4c81;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    transition: 0.2s;
}

.tax-item:hover {
    background: #0f4c81;
    color: #fff;
}






/* ================================================
   パンくず 全体の見た目
   ================================================ */
/* パンくず 全体 */
.breadcrumbs {
    font-size: 14px;
    color: #9aa0a6;
    margin: 10px 0 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

/* 要素間のすき間はセパレータで管理するので gap は小さめに */
.breadcrumbs > * {
    display: inline-flex;
    align-items: center;
}

/* 区切り記号 */
.breadcrumbs .bc-sep {
    margin: 0 6px;
    color: #c0c4c9;
}

/* リンク */
.breadcrumbs a {
    color: #9aa0a6;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.breadcrumbs a:hover {
    color: #666;
}

/* 現在位置 */
.breadcrumbs .current {
    color: #666;
}

/* アイコン（Font Awesome 前提） */
.breadcrumbs .home-icon::before {
    content: "\f015";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 4px;
}

.breadcrumbs .folder-icon::before {
    content: "\f07b";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 4px;
}



.note-list{
  background: #f2f4f7;
  padding: 12px 14px 12px 2.2em;
  border-radius: 6px;
  margin: 14px 0;
  box-shadow: 4px 6px 12px rgba(0,0,0,0.08);
}

.note-list li{
  margin-bottom: 10px;
  line-height: 1.6;
}

.note-list li:last-child{
  margin-bottom: 0;
}

.note-sub{
  margin-top: 2px;
  padding-left: 1.2em;
  font-size: 0.8em;
  color: #666;
  line-height: 1.5;
}

/* ================================================
   作品カード
   ================================================ */
/* H3の枠・線・装飾を完全リセットして、普通の小見出し風に整える */
.entry-content h3.toc-title,
.toc-title-wrapper h3.toc-title {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;

  /* 左寄せ（Cocoonスキンが中央寄せの場合も上書き） */
  text-align: left !important;

  /* 小さめの普通の文字に戻す */
  font-size: 10px !important;
  line-height: 1.2 !important;
  font-weight: normal !important;
  color: inherit !important;

  /* 高さは自動（文字を見せる） */
  height: auto !important;
  overflow: visible !important;
}

/* Cocoonスキンの before/after 装飾を消す */
.entry-content h3.toc-title::before,
.entry-content h3.toc-title::after {
  content: none !important;
}

.work-card {
  background: #fff;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* 上段 */
.work-card-main {
  display: flex;
  gap: 12px;
  padding: 12px;
/*   cursor: pointer; */
  align-items: center;
}

/* 上段 */
.work-card-main2 {
  display: flex;
  gap: 12px;
  padding: 12px;
  align-items: center;
}

.work-thumb {
  flex: 0 0 240px;     /* 画像エリアを固定幅に（縮ませない） */
  max-width: 240px;
}

.work-thumb img {
  width: 100%;   /* 親の幅に合わせる */
  height: auto;
  display: block;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/* ===== デビュー作カード：PCは横並びで画像を潰さない ===== */
.work-thumb2{
  flex: 0 0 240px;     /* 画像エリアを固定幅に（縮ませない） */
  max-width: 240px;
}

.work-thumb2 img{
  width: 100%;
  height: auto;
  display: block;
}

.work-thumb3 {
  flex: 0 0 240px;     /* 画像エリアを固定幅に（縮ませない） */
  max-width: 240px;
}

.work-thumb3 img {
  width: 100%;   /* 親の幅に合わせる */
  height: auto;
  display: block;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}


/* 文字側は残りを全部使う（既に min-width:0 は入っててOK） */
.work-info{
  flex: 1 1 auto;
}

/* ===== スマホ：縦並び（案A） ===== */
@media (max-width: 600px){
  .work-card-main{
    flex-direction: column;   /* 縦に積む */
    align-items: stretch;     /* 幅いっぱい */
  }

  .work-thumb{
    flex: none;
    max-width: none;
    width: 100%;
  }

  /* 画像を大きく見せる */
  .work-thumb img{
    width: 100%;
  }

  /* テキストの視認性調整（必要なら） */
  .work-title{
    -webkit-line-clamp: 3; /* SPは3行までOKにする例（任意） */
  }

  /* 行間や余白が気になるなら（任意） */
  .work-card-main{
    gap: 10px;
  }
}

/* ===== スマホ：縦並び（案A） ===== */
@media (max-width: 600px){
  .work-card-main2{
    flex-direction: column;   /* 縦に積む */
    align-items: stretch;     /* 幅いっぱい */
  }

  .work-thumb2{
    flex: none;
    max-width: none;
    width: 100%;
  }

  /* 画像を大きく見せる */
  .work-thumb2 img{
    width: 100%;
  }

  /* テキストの視認性調整（必要なら） */
  .work-title{
    -webkit-line-clamp: 3; /* SPは3行までOKにする例（任意） */
  }

  /* 行間や余白が気になるなら（任意） */
  .work-card-main2{
    gap: 10px;
  }
}


/* ===== スマホ：縦並び（案A） ===== */
@media (max-width: 600px){
  .work-card-main2{
    flex-direction: column;   /* 縦に積む */
    align-items: stretch;     /* 幅いっぱい */
  }

  .work-thumb3{
    flex: none;
    max-width: none;
    width: 100%;
  }

  /* 画像を大きく見せる */
  .work-thumb3 img{
    width: 100%;
  }

  /* テキストの視認性調整（必要なら） */
  .work-title{
    -webkit-line-clamp: 3; /* SPは3行までOKにする例（任意） */
  }

  /* 行間や余白が気になるなら（任意） */
  .work-card-main2{
    gap: 10px;
  }
}

.work-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-cast,
.work-genre {
  font-size: 13px;
  color: #444;
  margin-bottom: 4px;
}

.work-campaign {
  font-size: 12px;
  color: #7a1f2b;
  margin-bottom: 4px;
}

.work-indicator {
  font-size: 12px;
  color: #555;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: color .2s;
}

.work-indicator::after {
  content: "›";
  font-size: 14px;
  margin-left: 2px;
  transition: transform .2s;
}

.work-indicator:hover {
  color: #000;
}

.work-indicator:hover::after {
  transform: translateX(3px);
}


/* 下段 */
.work-card-detail {
  display: none;
  padding: 12px 12px 16px;
  border-top: 1px solid #eee;
}

.work-card.is-open .work-card-detail {
  display: block;
}

/* サンプル画像 */
.sample-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}

.sample-scroll img {
  height: 90px;
  flex-shrink: 0;
}

/* レビュー */
.work-review {
  font-size: 14px;
  line-height: 1.6;
}

.review-link {
  display: inline-block;
  font-size: 14px;
  color: #1a4fa3;
  margin-bottom: 12px;
  text-decoration: none;
}

.review-link:hover {
  text-decoration: underline;
}

/* CTA */
.cta-button2 {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  background: #0f2a44;
  color: #fff !important;
  padding: 12px;
  font-weight: 600;
  text-decoration: none;
}

.cta-button2:hover {
  opacity: .9;
  color: #fff !important; /* Cocoonのリンクホバーを上書き */
}


/* クリックできるエフェクト（画像） */
.work-thumb img,
.sample-scroll img {
  cursor: zoom-in;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.work-thumb img:hover,
.sample-scroll img:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

.work-thumb img:active,
.sample-scroll img:active {
  transform: translateY(0);
  opacity: .9;
}

/* クリックできるエフェクト（画像） */
.work-thumb2 img,
.sample-scroll img {
  cursor: zoom-in;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.work-thumb2 img:hover,
.sample-scroll img:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

.work-thumb2 img:active,
.sample-scroll img:active {
  transform: translateY(0);
  opacity: .9;
}

/* クリックできるエフェクト（画像） */
.work-thumb3 img,
.sample-scroll img {
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.work-thumb3 img:hover,
.sample-scroll img:hover {
}

.work-thumb3 img:active,
.sample-scroll img:active {
  transform: translateY(0);
  opacity: .9;
}


/* ライトボックス（モーダル） */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2147483647 !important; /* これでほぼ全部より前に来る */
}

.lightbox.is-open {
  display: block;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
}

.lightbox-panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 2147483647; /* 念のため */
}

.lightbox-image {
  max-width: min(1000px, 92vw);
  max-height: 86vh;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  background: #fff;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255,255,255,.9);
  cursor: pointer;
  font-size: 26px;
  line-height: 40px;
  text-align: center;
}



/* 出演作テキストオンリー */
.other-works-toggle {
  background: none;
  border: none;
  padding: 6px 0;
  font-size: 13px;
  color: #444;
  cursor: pointer;
}

.other-works-toggle:hover {
  color: #000;
}

.other-works-list {
  display: none;
  margin-top: 6px;
  padding-left: 1em;
}

.other-works.is-open .other-works-list {
  display: block;
}

.other-works-list li {
  margin-bottom: 4px;
  font-size: 13px;
}

.has-review {
  font-size: 11px;
  color: #7a1f2b;
  margin-left: 4px;
}


/* 全体枠 */
.actress-profile-box {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  padding: 16px;
  margin-bottom: 28px;
}

/* 上段プロフィール */
.actress-profile-head {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

/* 顔写真 */
.actress-photo img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  /*border-radius: 4px;*/
  display: block;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

/* テキスト側 */
.actress-profile-text {
  flex: 1;
  min-width: 0;
}

/* ショートプロフィール */
.actress-short-profile {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 6px;
  color: #333;
}

/* タグ */
.actress-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.actress-tags .tag {
  font-size: 11px;
  padding: 2px 6px;
  background: #eef2f6;
  color: #334;
  border-radius: 3px;
  white-space: nowrap;
}

/* 個別記事リンク */
.actress-link a {
  font-size: 12px;
  color: #005488;
  text-decoration: none;
}

.actress-link a:hover {
  text-decoration: underline;
}

/* デビュー作カードとの距離 */
.actress-debut-card {
  margin-top: 10px;
}



/* ========== 2列グリッド ========== */
.actress-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* PCで余裕があるなら3列にもできる（任意）
@media (min-width: 1100px){
  .actress-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
*/

.actress-mini{
  background: #fff;
  border: 1px solid #e7e7e7;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.actress-mini-head{
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.actress-mini-photo{
  width: 80px;
  height: 80px;
  object-fit: cover;
  display: block;
  /*border-radius: 4px;*/
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  flex: 0 0 auto;
}

.actress-mini-meta{
  min-width: 0;
  flex: 1;
}

.actress-mini-name{
  margin: 0 0 4px !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.actress-mini-one{
  margin: 0 0 6px !important;
  font-size: 12px;
  color: #333;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.actress-mini-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.actress-mini-tags .tag{
  font-size: 11px;
  padding: 2px 6px;
  background: #eef2f6;
  color: #334;
  border-radius: 3px;
  white-space: nowrap;
}

/* ========== リンクチップ（重要） ========== */
.actress-mini-links{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.mini-link{
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid #d6dbe2;
  border-radius: 999px;
  text-decoration: none;
  color: #0f2a44;
  background: #f7f9fc;
  line-height: 1;
}

.mini-link:hover{
  background: #eef3fb;
}

/* CTAを常にカード下部へ */
.actress-mini-cta{
   /*margin-top: auto;*/             /* ←これを有効化 */
  display: flex;
  justify-content: flex-end;
}

.mini-indicator{
  font-size: 12px;
  color: #555;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mini-indicator::after{
  content: "›";
  font-size: 14px;
  transform: translateY(-0.5px);
}

/* ホバーで軽く反応（PC） */
@media (hover:hover){
  .actress-mini:hover{
    box-shadow: 0 4px 14px rgba(0,0,0,.10);
  }
  .actress-mini:hover .mini-indicator{
    color: #000;
  }
}

@media (max-width: 600px){
  .actress-grid{
    grid-template-columns: 1fr;
  }
}


/* ========== モーダル ========== */
/* モーダルは必ず最前面に */
.detail-modal{
  display: none;                 /* ← これが最重要 */
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  isolation: isolate;
}


/* JSで開いた時だけ表示 */
.detail-modal.is-open{
  display: block;
}

.detail-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
}

/* パネル（中身） */
.detail-panel{
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
  overflow: auto;
}

/* 中身本体 */
.detail-body{
  width: min(980px, 100%);
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  padding: 14px;

  /* sticky CTA を使うなら下に余白 */
  padding-bottom: 74px;
}


/* モーダル内では“もう詳細画面なので”インジケータ不要 */
/* ===== モーダル内ヘッダー軽量化 ===== */
/* モーダル内のヘッダーは常に横並び */

.detail-body .detail-header{
  display: flex !important;
  align-items: center;
  gap: 12px;
}

.detail-body .detail-header-left{
  flex: 0 0 auto;
}

.detail-body .detail-header-right{
  flex: 1;
  min-width: 0;
}

.detail-body .detail-header{
  align-items: flex-start; /* center に戻したければ center */
}

.detail-body .detail-photo{
  width: 100px;
  height: 100px;
}

.detail-body .detail-name{
  font-size: 15px;
  line-height: 1.2;
  margin-bottom: 3px;
}

.detail-body .detail-sub{
  font-size: 12px;
  line-height: 1.35;
  margin-bottom: 6px;

  /* 2行まで */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* リンクチップ：横並び1行想定、溢れたら折り返しOK */
.detail-body .detail-links{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.detail-body .mini-link{
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  line-height: 1;
  white-space: nowrap;
}


/* ===== モーダル内：サンプル画像グリッド ===== */
.detail-body .modal-samples{
  margin-top: 10px;
}

.detail-body .sample-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

/* 画像は普通にフィット */
.detail-body .sample-grid img{
  width: 100%;
  height: auto;
  display: block;
}

/* グループごとに上下を区切る */
.sample-group{
  margin-bottom: 14px;
}

/* 小さめ端末は3列に */
@media (max-width: 720px){
  .detail-body .sample-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 「さらに表示」ボタン */
.detail-body .sample-more{
  margin-top: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d6dbe2;
  background: #f7f9fc;
  color: #0f2a44;
  font-size: 13px;
  cursor: pointer;
}

.detail-body .sample-more:hover{
  background: #eef3fb;
}


/* ===== モーダル内：sticky CTA ===== */
.detail-body{
  /* 既に padding:14px などある前提。sticky分の余白を下に確保 */
  padding-bottom: 74px;
}

.detail-body .modal-cta{
  position: sticky;
  bottom: 0;
  margin-top: 12px;
  padding-top: 10px;

  /* 下に貼り付く部分の背景 */
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(6px);
}

/* CTA自体は既存の .cta-button を使う（文字色上書きは済み想定） */
.detail-body .modal-cta .cta-button{
  margin: 0;
}


/* ===== モーダル：閉じるボタン改善 ===== */
/* 閉じるボタン（丸背景） */
.detail-close{
  position: fixed;
  top: 10px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  cursor: pointer;
  font-size: 26px;
  line-height: 44px;
  text-align: center;
}
.detail-close:hover{
  background: rgba(255,255,255,.95);
}


/* ===== ライトボックス：大画像 + 右サムネ列 ===== */
#lightbox.lightbox .lightbox-panel{
  display: flex;
  gap: 12px;
  max-width: min(1100px, 92vw);
  max-height: 90vh;
  padding: 14px;
  box-sizing: border-box;
}

#lightbox.lightbox .lightbox-main{
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox.lightbox .lightbox-image{
  max-width: 100%;
  max-height: 86vh;
  width: auto;
  height: auto;
  display: block;
}

#lightbox.lightbox .lightbox-thumbs{
  flex: 0 0 120px;
  max-height: 86vh;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

#lightbox.lightbox .lightbox-thumb{
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

#lightbox.lightbox .lightbox-thumb img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

#lightbox.lightbox .lightbox-thumb.is-active{
  border-color: rgba(255,255,255,.9);
}




/* ===== スマホ時：サムネを下に並べる ===== */
@media (max-width: 768px){

  #lightbox.lightbox .lightbox-panel{
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    max-width: 95vw;
  }

  #lightbox.lightbox .lightbox-main{
    width: 100%;
  }

  #lightbox.lightbox .lightbox-image{
    max-height: 60vh;   /* 潰れ防止 */
  }

  #lightbox.lightbox .lightbox-thumbs{
    width: 100%;
    max-width: 100%;

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;

    max-height: calc(70px * 2 + 8px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  #lightbox.lightbox .lightbox-thumb{
    width: auto; /* ← ここ重要：70px固定を解除 */
  }

  #lightbox.lightbox .lightbox-thumb img{
    width: 100%;
    height: 70px;
    object-fit: cover;
    display: block;
  }
  
  /* ★ 追加：サムネ枠を幅いっぱいにする */
  #lightbox.lightbox .lightbox-thumbs{
    width: 100%;
    max-width: 100%;
    justify-content: start; /* 念のため */
  }

  /* ★ 追加：グリッドを「中央寄せ」じゃなく左詰めに */
  #lightbox.lightbox .lightbox-thumbs{
    justify-items: start;
    align-content: start;
  }
}