/* === 共通スタイル === */
body {
  font-family: "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, "Helvetica", "Arial", sans-serif;
  text-align: center;
  margin: 0;
  padding: 0;
  margin-bottom: 0 !important;
}

/* === テーマ別背景 === */
body[data-theme="STD"] {
  background-color: #0000cc;
  color: #ffffff;
}
body[data-theme="PRE"] {
  background-color: #000000;
  color: #ffffff;
}

/* === Header 全体 === */
header.model-header {
  text-align: left;
  padding: 0;
  margin: 0 auto;
  max-width: 830px;
  border-top: none;
  border-bottom: none;
}

/* === タイトル画像を左、DAT情報を右 === */
.title-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 760px;
  max-width: 95vw;
  margin-top: 0;
  margin-bottom: 4px;
  gap: 16px;
  padding-left: 10px;
  position: relative; /* 横線用 */
}

/* 画像部分 */
.title-wrap img.model-photo {
  width: 431px;
  height: 136px;
  display: block;
  object-fit: cover;
  margin: 0;
  align-self: flex-start;
  border: none;
}

/* === systemtitle.png の上下に横線 === */
.title-wrap::before,
.title-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  width: 431px;
  background-color: currentColor;
  z-index: 2;
}
.title-wrap::before {
  top: 0;
  height: 4px;
}
.title-wrap::after {
  top: 132px;
  height: 4px;
}

/* Premium（金ライン） */
body[data-theme="PRE"] .title-wrap::before,
body[data-theme="PRE"] .title-wrap::after {
  background-color: #ffffff;
}

/* === コンテナ（中央寄せ＆最大幅制限）=== */
main, header, footer {
  position: relative;
  display: block;
  margin: 0 auto;
  max-width: 830px;
  background-color: transparent;
  box-shadow: 0 0 0 4px currentColor inset;
  margin-bottom: 10px;
}

/* --- ギャラリー専用 main の幅制限解除＆軽量化 --- */
main.gallery-container {
  max-width: none !important;   /* 共通830px制限を無効化 */
  width: 95%;                   /* 会員エリアは90〜95%幅で視認性重視 */
  box-shadow: none !important;  /* 外枠の飾りを除去 */
  background: transparent !important;
  margin: 0 auto;
}

/* === 点線（正方形ドット版） === */
main::before, main::after,
footer::before, footer::after,
header::before, header::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 16px; /* ドット列の幅 */
  background-image: repeating-linear-gradient(
    to bottom,
    currentColor 0,
    currentColor 13px,     /* ■の高さ */
    transparent 13px,
    transparent 30px       /* ■の間隔 */
  );
}

/* 左右位置 */
main::before, footer::before, header::before {
  left: -23px;  /* 外にずらす */
}
main::after, footer::after, header::after {
  right: -23px; /* 外にずらす */
}


body[data-theme="PRE"] main,
body[data-theme="PRE"] header,
body[data-theme="PRE"] footer {
  border-left-color: #ffffff;
  border-right-color: #ffffff;
  box-shadow: 0 0 0 4px #ffffff inset;

}

/* === DATテキスト配置 === */
.title-text {
  flex: 1;
  text-align: left;
  width: 100%;
  margin-left: 25px;
  color: currentColor;
  line-height: 1.6;
  font-size: 1.1em;
  background: none;
  padding: 1px 0 8px 17px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.title-text h1 {
  font-size: 1.2em;
  margin: -9px 0 -23px;
  font-weight: 700;
  font-style: italic;  /* ← 斜体指定 */
}
.title-text p {
  margin: -9px 0;
  line-height: 1.2;
  font-size: 0.9em;
}
body[data-theme="PRE"] .title-text h1,
body[data-theme="PRE"] .title-text {
  color: #ffffff;
  background: rgba(255,255,255,0);
  font-weight: 700;
}

/* === SNSリンク === */
.title-text .sns {
  margin-top: 8px;
}
.title-text .sns a {
  color: #ffeb3b;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95em;
  transition: opacity 0.3s ease;
}
.title-text .sns a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

/* === Picture Gallery 説明文 === */
.gallery-intro {
  width: 90%;
  max-width: 800px;
  margin: 5 auto -25px;
  padding: 8px;
  border-radius: 8px;
  font-size: 0.9em;
  line-height: 1.2;
  text-align: left;
  margin-left: 24px;
  margin-top: 0px;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
  background-clip: padding-box;
}
.gallery-intro h2 {
  font-size: 1.6em;
  margin: 9px 0 5px;
  font-weight: 700;
  line-height: 1.2; 
}

.gallery-intro h2 span.highlight {
  color: #ff3333 !important;
  font-weight: 800 !important;
  display: inline;
}

body[data-theme="STD"] .gallery-intro {
  background-color: rgba(0, 0, 255, 0);
  color: #ffffff;
}
body[data-theme="PRE"] .gallery-intro {
  background-color: rgba(255, 204, 51, 0);
  color: #ffffff;
  margin-top: 5px;
  margin-bottom: -10px;
}
/* MOVIE説明の本文（読みやすく調整） */
.gallery-intro p {
  font-size: 0.95em;
  line-height: 1.6;
  margin-top: 4px;
  margin-left: 0;
  margin-right: 4px;
}
.gallery-intro span {
  font-size: 1.2em;
  line-height: 1.6;
  margin-top: 0px;
  margin-left: 0;
  margin-right: 4px;
}

/* === Photo Gallery === */
.photo-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  text-align: center;
  margin-bottom: -5px;
  padding-bottom: 15px;
  overflow: hidden;
}
.photo-gallery img {
  height: 100px;
  border: none;
  object-fit: cover;
}
.photo-gallery a img {
  border: 1px solid #fff;
  background-color: #0000cc;
}
.photo-gallery .sample {
  flex-basis: 100%;
  width: 100%;
  text-align: center;
  font-weight: bold;
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
.photo-gallery img.sample-photo {
  height: 150px !important;
  object-fit: cover;
}
.photo-gallery img.mo-photo {
  height: 80px !important;
  object-fit: contain !important;
  vertical-align: bottom !important;
  margin-top: 20px;
}
body[data-theme="PRE"] .photo-gallery a img {
  border: 1px solid #ffffff;
  background-color: #000000;
}

/* === Movie Gallery === */
.movie-gallery {
  width: 97%;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  margin-bottom: -4px;
}

/* movieページ内のサンプル画像を簡易表示（余白リセット） */
.movie-gallery + .photo-gallery.free,
.photo-gallery.free + .movie-gallery,
.movie-gallery .photo-gallery.free {
  display: block;
  margin: 0 auto 8px !important;
  padding: 0 !important;
  gap: 0 !important;
}
.photo-gallery.free .sample {
  margin: 1px 0 0;
  font-size: 1em;
}

.photo-gallery.free img.sample-photo {
  height: 140px;
  width: auto;
  border: 1px solid #fff;
  border-radius: 4px;
  margin: 0 4px;
}


.thumb-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top:15px;
  margin-bottom: 15px;
  border: 2px solid currentColor;
  padding: 4px;
}

.thumb-row img {
  width: calc(25% - 6px);
  height: 100px;
  object-fit: cover;
  border: none;
}

/* === Download 見出し === */
.movie-download h2 {
  font-size: 1.4em;
  color: #fff;
  margin: 10px 0;
  font-weight: 700;
  text-align: left;
}

/* === Download 最下部のマージン === */
.movie-download h3 {
  height:12px;
}

/* Premium用アクセント */
body[data-theme="PRE"] .movie-download h2 {
  color: #ffcc33;
}


/* スマホ調整 */
@media (max-width: 768px) {
  .thumb-row img {
    width: 48%;
    height: auto;
  }
}

/* === STD（通常版）Downloadボタン === */
body[data-theme="STD"] .stream-btn {
  color: #ffffff;
  background: linear-gradient(180deg, #000000 0%, #2b3753 100%);
  border: 2px solid #99ccff;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 1.1em;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  margin: 10px auto;      /* ← 上下中央寄せ */
  width: auto;            /* ← 横幅を内容に合わせる */
  text-align: center;
  box-shadow: 0 3px 6px rgba(0,0,0,0.3);
  transition: all 0.25s ease-in-out;
}

body[data-theme="STD"] .stream-btn:hover {
  background: linear-gradient(180deg, #ccfff8 0%, #0044cc 100%);
  border-color: #cce0ff;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.4);
}

/* ボタンをsection内で中央に配置 */
.movie-gallery {
  text-align: center;
}



/* === STREAMリンク（動画配信用） === */
.stream-links {
  width: 100%;
  max-width: 820px;
  margin: 12px auto 20px;
  border-collapse: collapse;
  text-align: center;
}

.stream-links td {
  width: 50%;
  padding: 2px;
  vertical-align: middle;
}

/* --- ボタン全体 --- */
.stream-btn {
  display: inline-block;
  width: 90%;
  padding: 12px 10px;
  background: linear-gradient(180deg, #222, #000);
  border: 2px solid #ffcc33;
  border-radius: 6px;
  color: #ffffff;
  font-size: 1.3em;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
}

/* --- hover時 --- */
.stream-btn:hover {
  background: #ffcccc;
  color: #000;
  transform: scale(1.03);
}

/* --- Premiumテーマは金色を強調 --- */
body[data-theme="PRE"] .stream-btn {
  border-color: #ffff66;
  color: #70f0f7;
}

body[data-theme="PRE"] .stream-btn:hover {
  background: #cccccc;
  color: #000;
}

/* --- レスポンシブ: 縦並びに --- */
@media (max-width: 768px) {
  .stream-links tr {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .stream-links td {
    width: 100%;
  }

  .stream-btn {
    font-size: 1.1em;
    width: 95%;
  }
}


/* === Footer === */
.footer-box {
  width: 100%;
  text-align: left;
  margin-top: 10px;
  padding-bottom: 0;
}
.footer-bg {
  background-image: url("https://www.coolgalsonline.com/menu/parts/kbox.png");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
  width: 100%;
  max-width: 830px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 2%;
  margin-bottom: 30px;
  position: relative;
  overflow: visible;
}
.footer-bg::before,
.footer-bg::after {
  content: "";
  position: absolute;
  left: 0;
  width: 98%;
  background-color: currentColor;
  z-index: 3;
}
.footer-bg::before { top: 0; height: 3px; }
.footer-bg::after { bottom: 0; height: 6px; }
body[data-theme="PRE"] .footer-bg {
  background-image: url("https://www.coolgalsonline.com/menu/parts/kboxy.png");
}
.footer-inner {
  width: 63%;
  display: flex;
  justify-content: flex-end;
}
.iframe-wrap { height: 125px; }

/* === Copyright Section === */
body.copyright-page {
  padding: 0;
  text-align: center;
  background: transparent;
  font-family: "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, sans-serif;
  color: #FFC;
  margin: 0px auto;
  font-size: 21px;
  line-height: 1.4;
}

body.copyright-page a {
  text-decoration: none;
  color: #FFC;
  transition: opacity 0.3s ease;
}

body.copyright-page a:hover {
  opacity: 0.8;
}

/* === Responsive Adjustment === */
@media (max-width: 768px) {
body.copyright-page {
    margin: 16px auto;
    font-size: 20px;
  }

}


/* === 入会案内テーブル === */
.join-table {
  max-width: 820px;
  margin: 10px auto 30px;
  border-collapse: collapse;
}
.join-table th {
  padding: 6px;
  text-align: center;
  vertical-align: middle;
}
body[data-theme="STD"] .join-table {
  background-color: rgba(0, 0, 0, 0.7);
}
body[data-theme="PRE"] .join-table {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* === ページ最下部の余白を削除 === */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* === レスポンシブ調整 === */
@media (max-width: 768px) {
  /* タイトル部 */
  .title-wrap {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    gap: 8px;
  }
  .title-wrap img.model-photo {
    width: 90%;
    height: auto;
    max-width: 400px;
    object-fit: contain;
  }
  /* タイトル線を非表示 */
  .title-wrap::before,
  .title-wrap::after {
    display: none !important;
  }
  .title-text {
    display: block !important;
    width: 95%;
    margin-top: -7px;
    padding: 18px 5px !important;
    background: none !important;
    line-height: 1.6;
    text-align: center;
  }
  .title-text .sns {
    display: block;
    margin-top: 6px;
    line-height: 1.2em;
    word-break: break-all;
  }
  /* ギャラリー・テーブル */
  .gallery-intro { margin-top: -9px !important; margin-bottom: 9px !important; }
  .join-table {
    width: 96% !important;
    margin: 0 auto 14px !important;
  }
  .footer-bg {
    justify-content: center;
    padding: 0;
    width: 100%;
    background-size: cover;
    background-position: center;
  }
  .footer-inner {
    width: 90%;
    justify-content: center;
  }
  .iframe-wrap iframe {
    width: 90%;
  }
}
/* === Join Table === */
.join-table {
  width: 100%;
  max-width: 820px;
  margin: 3px auto 10px;
  border-collapse: collapse;
  text-align: center;
}

.join-table th {
  padding: 5px;
  vertical-align: middle;
  color: #fff;
}
.join-table th a{
  padding: 5px;
  vertical-align: middle;
  color: #d8ff65;
  text-decoration: none;
}

.join-table img {
  width: 84%;
  height: 41px;
  margin-top: 5px;
}

/* PC時 */
.join-table .info { font-size: 1.1em; }
.join-table .join { font-size: 1em; }
.join-table .vip { font-size: 0.9em; }

/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {
  .join-table th {
    display: block;
    width: 90%;
    margin: 0 auto 10px;
  }
  .join-table img {
    width: 90%;
    height: auto;
	margin: 2px;
  }
  .join-table th {
  padding: 0px;
  vertical-align: middle;
  color: #fff;
}
.join-table th a{
  padding: 0px;
  vertical-align: middle;
  color: #d8ff65;
  text-decoration: none;
}
  .join-table .info,
  .join-table .join,
  .join-table .vip {
    font-size: 1em;
  }
}

/* ==========================================================
   Gallery Section（STD / PRE 共通）
   ========================================================== */

/* --- ギャラリー全体 --- */
.gallery-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin: 0 auto;
  padding: 10px 0 30px;
}

/* --- サムネイルグリッド --- */
.model-grid,
.premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 12px;
  width: 95%;
  max-width: 1800px;
  margin: 0 auto 40px;
  text-align: center;
}

/* --- テーマごとの背景調整 --- */
body[data-theme="STD"] .model-item {
  background: rgba(0, 0, 128, 0.3);
  border: 1px solid #99ccff;
}
body[data-theme="PRE"] .premium-item {
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid #ffcc33;
}

/* --- アイテム共通 --- */
.model-item,
.premium-item {
  position: relative;
  overflow: visible;
  z-index: 1;
  transition: transform 0.25s ease;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px;
  box-shadow: 0 0 3px rgba(0,0,0,0.3);
  text-align: center;
  vertical-align: top;
}
.model-item:hover,
.premium-item:hover {
  z-index: 10;
}

/* --- 画像 --- */
.model-item img,
.premium-item img {
  width: 96%;
  height: auto;
  margin: 2%;
  border-radius: 6px;
  border: 1px solid #fff;
  display: block;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.model-item:hover img,
.premium-item:hover img {
  transform: scale(3.4);
  filter: brightness(1.1);
  box-shadow: 0 6px 15px rgba(0,0,0,0.4);
}


/* --- 名前テキスト --- */
.model-item p,
.premium-item p {
  color: #fff;
  font-size: 0.9em;
  margin: 4px 0 0;
  line-height: 1.3;
}

/* --- NEWマーク（テキスト）--- */
.new-mark::after {
  content: "NEW";
  display: inline-block;
  color: #000;
  background: #ff0;
  font-weight: bold;
  font-size: 0.8em;
  padding: 1px 4px;
  margin-left: 5px;
  border-radius: 3px;
}

/* --- 解像度バッジ --- */
.badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: #ff0ccc;
  color: #fff;
  font-size: 0.9em;
  font-weight: bold;
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1;
  z-index: 5;
  opacity:0.8;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
body[data-theme="PRE"] .badge {
  background: #ffcc00;
  color: #000;
}

/* --- VIPエリア説明 --- */
.vip-info {
  margin: 40px auto;
  padding: 10px;
  background-color: rgba(255, 255, 204, 0.1);
  border-top: 2px solid #999;
  border-radius: 6px;
  font-size: 0.9em;
  color: #fff;
  width: 90%;
  max-width: 800px;
}

/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {
  .model-grid,
  .premium-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }
  .model-item p,
  .premium-item p {
    font-size: 0.8em;
  }
  .badge {
    font-size: 0.6em;
    padding: 2px 4px;
  }
  .new-mark img {
    width: 20px;
  }
}
/* ==========================================================
   Hover Zoom for FREE Photo Gallery (STD)
   ========================================================== */

/* --- 通常サムネイル：ズーム効果 --- */
.photo-gallery.free img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-origin: center center;
  cursor: pointer;
}

/* --- hover時：ふわっと拡大 --- */
.photo-gallery.free img:hover {
  transform: scale(1.5);
  z-index: 5;
  position: relative;
  box-shadow: 0 0 15px rgba(255,255,255,0.8);
  border: 1px solid #fff;
}

/* --- サンプル画像（金枠＋強調） --- */
.photo-gallery.free a img.sample-photo:hover {
  transform: scale(3.5);
  box-shadow: 0 0 20px rgba(255,220,100,0.9);
  border: 2px solid #ffd841;
}

/* --- moプレースホルダは拡大しない --- */
.photo-gallery.free img.mo-photo:hover {
  transform: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* --- ズーム時の切れ防止 --- */
.photo-gallery {
  overflow: visible;
}

/* --- サンプル行：中央寄せ・マージン調整 --- */
.photo-gallery .sample {
  text-align: center;
  margin: 20px 0;
  font-weight: bold;
  font-size: 1.1em;
  color: #fff;
}

.photo-gallery .sample a img {
  margin: 0 18px;
}

.photo-gallery .sample p {
  font-size: 1em;
  color: #fff;
  font-weight: bold;
  margin-bottom: 8px;
}

