/* style.css */

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  background: #fafafa;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  width: 96%;
  margin: 0 auto;
  padding: 18px 2%;
  box-sizing: border-box;
}

header, footer {
  background: #222;
  color: #fff;
  padding: 12px 0;
  text-align: center;
}

footer {
  box-shadow: 0 -2px 8px #0001;
  border-top: 1px solid #333;
}

header nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 0 8px;
}

.pr-notice {
  display: block;         /* ブロック要素にして横幅いっぱいに */
  width: 100%;            /* 横 100% を確保 */
  margin: 3px;              /* 上下左右の余白を3px */
  padding: 2px 0;         /* 上下 2px、左右は自動幅で調整 */
  font-size: 13px;        /* 文字サイズを少し小さめに */
  line-height: 1.2;       /* 行の高さを抑えて縦幅を狭く */
  text-align: center;     /* テキストを横方向の中央に寄せる */
}

/* 全画面モーダル */
#age-modal {
  display: none;             /* JS で切り替え */
  position: fixed;           /* 画面に固定 */
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;              /* ビューポート全幅 */
  height: 100vh;             /* ビューポート全高 */
  background: rgba(0, 0, 0, 0.95); /* 黒を95%不透明に */
  z-index: 10000;            /* すべてより前面 */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* モーダル表示中はスクロール停止 */
body.modal-open {
  overflow: hidden;
  touch-action: none;        /* モバイルのスワイプも無効化 */
}

/* モーダル内のボックスはお好みでOK */
#age-modal-inner {
  background: #fff;
  padding: 24px;
  text-align: center;
  border-radius: 8px;
  max-width: 90%;
}

h1 {
  margin: 18px 0 7px;
  font-size: 1.5rem;
  text-align: center;
}

.description, .info {
  color: #555;
  margin-bottom: 12px;
  font-size: 14px;
  text-align: center;
}

.sortbar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.sortbar select, .sortbar button {
  font-size: 14px;
  padding: 5px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.sortbar button {
  background: #f60;
  color: #fff;
  border: none;
  cursor: pointer;
  min-width: 36px;
}

.works-list {
  display: grid;
  gap: 24px;
  justify-content: center;
}

@media (min-width:800px) {
  .works-list { grid-template-columns: repeat(3,1fr); }
}
@media (min-width:540px) and (max-width:799px) {
  .works-list { grid-template-columns: repeat(2,1fr); }
}
@media (max-width:539px) {
  .works-list { grid-template-columns: 1fr; }
}

.work-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px #0001;
  padding: 14px 10px 18px;
  margin: 0 auto;
  max-width: 360px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.work-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 1.05rem;
  font-weight: bold;
  margin-bottom: 7px;
  word-break: break-word;
}

.num, .badge {
  margin-right: 3px;
}

.badge {
  background: #f60;
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
}

.badge-best {
  background: #0066cc;  /* ベスト・総集編用青バッジ */
}

/* VRバッジ用 */
.badge-vr {
  background: #000; /* 黒バック */
  color: #fff;     /* 白文字 */
}

.main-img-wrap {
  position: relative;
  text-align: center;
}

.main-img {
  width: 100%;
  max-width: 340px;
  border-radius: 6px;
  box-shadow: 0 2px 8px #0002;
  margin-bottom: 7px;
}

.img-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30,30,30,0.6);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}

.img-nav-btn.left { left: 6px; }
.img-nav-btn.right { right: 6px; }

.samples-wrap {
  overflow-x: auto;
  white-space: nowrap;
  margin-bottom: 7px;
}

.sample-img {
  height: 54px;
  margin: 0 4px;
  border: 1.5px solid #eee;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
}

.sample-img.selected, .sample-img:hover {
  border-color: #f60;
}

table.work-table {
  width: 100%;
  border-collapse: collapse;
  margin: 7px 0;
  font-size: 14px;
}

.work-table th {
  width: 40%;
  background: #f3f3f3;
  text-align: center;
  padding: 6px;
}

.work-table td {
  padding: 6px 5px;
}

.del {
  text-decoration: line-through;
  color: #aaa;
}

.sale-price {
  color: #c00;
  font-weight: bold;
  margin-left: 6px;
}

.btn-fanza {
  display: block;
  margin: 17px auto 0;
  background: #ff5000;
  color: #fff;
  padding: 12px 0;
  width: 90%;
  text-align: center;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}

.btn-fanza:hover {
  background: #d84400;
}

.campaign {
  color: #e21;
  font-weight: bold;
}

.back-to-top {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: #f60;
  color: #fff;
  border-radius: 50%;
  font-size: 24px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.back-to-top:hover {
  opacity: 0.8;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin: 14px 0 24px;
  font-size: 15px;
}

.pagination br {
  flex-basis: 100%;
  height: 0;
}

.pagination a,
.pagination span.current {
  min-width: 32px;
  text-align: center;
  padding: 2px 0;
  border-radius: 4px;
  text-decoration: none;
}

.pagination a {
  background: #f2f2f2;
  color: #0066cc;
  border: 1px solid #ddd;
}

.pagination span.current {
  background: #ff5000;
  color: #fff;
  border: 1px solid #d84400;
}
