/* 作品情報ボックス
   色は下の変数で調整できます */
.wib {
  --wib-line:   #e3e6eb;
  --wib-head:   #f5f6f8;
  --wib-text:   #2b2f36;
  --wib-sub:    #6b7280;
  --wib-accent: #1e63c8;
  --wib-sale:   #e0245e;
  --wib-dlsite: #1e63c8;
  --wib-fanza:  #d92b3a;
  --wib-steam:  #1b2838;

  margin: 2em 0;
  color: var(--wib-text);
  font-size: 15px;
  line-height: 1.6;
}

/* 作品画像 */
.wib-cover {
  margin-bottom: 14px;
  text-align: center;
  line-height: 0;
}
.wib-cover a { display: inline-block; max-width: 100%; }
.wib-cover img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  margin: 0 !important;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.10);
}

/* 表 */
.wib-table {
  width: 100%;
  margin: 0 !important;
  border: 1px solid var(--wib-line) !important;
  border-collapse: separate !important;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
  font-size: 14px;
  table-layout: fixed;
}
.wib-table th,
.wib-table td {
  padding: 11px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--wib-line) !important;
  vertical-align: middle;
  text-align: left !important;
  overflow-wrap: anywhere;
}
.wib-table tr:last-child th,
.wib-table tr:last-child td { border-bottom: 0 !important; }
.wib-table th {
  width: 13.5em;            /* PC：「メインシチュエーション」が1行に収まる幅 */
  background: var(--wib-head) !important;
  color: var(--wib-sub);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  white-space: nowrap;
}
.wib-table td { background: #fff !important; }
.wib-title {
  color: inherit !important;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none !important;
  overflow-wrap: anywhere;
}
a.wib-title:hover { color: var(--wib-accent) !important; text-decoration: underline !important; }

/* 価格 */
.wib-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.wib-price-now {
  color: var(--wib-sale);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  font-feature-settings: "tnum";
}
.wib-price-now.is-plain { color: var(--wib-text); font-size: 17px; }
.wib-price-now small { font-size: 12px; margin-left: 1px; }
.wib-off {
  align-self: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--wib-sale);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.wib-price-was { color: var(--wib-sub); font-size: 13px; }
.wib-sale-note {
  flex-basis: 100%;
  color: var(--wib-sale);
  font-size: 12px;
  font-weight: 700;
}

/* タグ */
.wib-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wib-tag {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--wib-line);
  border-radius: 999px;
  background: #fff;
  color: var(--wib-text) !important;
  font-size: 12px;
  line-height: 1.6;
  text-decoration: none !important;
}
a.wib-tag::before { content: "#"; opacity: .5; margin-right: 1px; }
a.wib-tag:hover { border-color: var(--wib-accent); color: var(--wib-accent) !important; }

/* 作品ID */
.wib-ids { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.wib-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}
.wib-id i {
  padding: 1px 6px;
  border-radius: 4px;
  color: #fff;
  font-family: inherit;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 700;
}
.wib-id i.is-dlsite { background: var(--wib-dlsite); }
.wib-id i.is-fanza  { background: var(--wib-fanza); }

/* セクション見出し */
.wib-sec { margin-top: 22px; }
.wib-sec-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 4px solid var(--wib-accent);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}
.wib-sec-title small { color: var(--wib-sub); font-size: 11.5px; font-weight: 400; }

/* サンプル画像 */
.wib-samples {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.wib-sample {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: var(--wib-head);
  aspect-ratio: 4 / 3;
  line-height: 0;
}
.wib-sample img {
  width: 100%;
  height: 100%;
  margin: 0 !important;
  object-fit: cover;
  transition: transform .25s;
}
.wib-sample:hover img { transform: scale(1.04); }

/* サンプル動画 */
.wib-video {
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  line-height: 0;
}
.wib-video iframe,
.wib-video video {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}
.wib-video > *:not(iframe):not(video) { line-height: 1.6; }

/* 購入ボタン */
.wib-buy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}
.wib-buy.has-3 { grid-template-columns: 1fr 1fr 1fr; }
.wib-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 3px 0 rgba(0,0,0,.15);
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
a.wib-btn:hover { transform: translateY(1px); box-shadow: 0 2px 0 rgba(0,0,0,.15); opacity: .92; }
a.wib-btn::after { content: "›"; margin-left: 8px; font-size: 18px; line-height: 1; }
.wib-btn.is-dlsite { background: var(--wib-dlsite); }
.wib-btn.is-fanza  { background: var(--wib-fanza); }
.wib-btn.is-steam  { background: var(--wib-steam); }
.wib-btn.is-disabled {
  background: #d9dce1 !important;
  color: #9aa0a8 !important;
  box-shadow: none;
  cursor: not-allowed;
  pointer-events: none;
}
.wib-btn-badge {
  position: absolute;
  top: -9px;
  right: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #ffd43b;
  color: #5a3d00;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.wib-pr {
  margin: 8px 0 0 !important;
  color: var(--wib-sub);
  font-size: 11px;
  text-align: right;
}

.wib-empty {
  padding: 16px;
  border: 1px dashed var(--wib-line);
  border-radius: 10px;
  color: var(--wib-sub);
  font-size: 13px;
  text-align: center;
}

/* ライトボックス */
.wib-lb-lock { overflow: hidden; }
.wib-lb {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10,12,16,.88);
}
.wib-lb.is-open { display: flex; }
.wib-lb img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.wib-lb button {
  position: absolute;
  border: 0;
  background: rgba(255,255,255,.12);
  color: #fff;
  cursor: pointer;
  line-height: 1;
}
.wib-lb button:hover { background: rgba(255,255,255,.25); }
.wib-lb-close { top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; }
.wib-lb-prev, .wib-lb-next { top: 50%; width: 48px; height: 64px; margin-top: -32px; border-radius: 8px; font-size: 36px; }
.wib-lb-prev { left: 12px; }
.wib-lb-next { right: 12px; }
.wib-lb.is-single .wib-lb-prev,
.wib-lb.is-single .wib-lb-next { display: none; }
.wib-lb-count {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  color: rgba(255,255,255,.8);
  font-size: 13px;
  text-align: center;
}

/* スマホ */
@media (max-width: 600px) {
  .wib { font-size: 14px; }
  .wib-table { font-size: 13px; }
  .wib-table th {
    width: 9.8em;            /* スマホ：「シチュエーション」が途中で切れない幅 */
    padding: 10px !important;
    font-size: 12px;
    white-space: normal;
    word-break: keep-all;    /* 「メイン／シチュエーション」の位置でだけ改行 */
    overflow-wrap: normal;
  }
  .wib-table td { padding: 10px !important; }
  .wib-price-now { font-size: 18px; }
  .wib-samples {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -4px;
    padding: 0 4px 6px;
    -webkit-overflow-scrolling: touch;
  }
  .wib-sample { flex: 0 0 72%; scroll-snap-align: start; }
  .wib-buy, .wib-buy.has-3 { grid-template-columns: 1fr; gap: 12px; }
  .wib-btn { min-height: 50px; }
  .wib-lb-prev, .wib-lb-next { width: 40px; height: 56px; font-size: 30px; }
}
