/* 一覧のライブ配信カード + 画面下固定バナー */

/* ----- ページ下の余白（固定バナー／タブバーに本文とフッターが隠れないように、最初から確保） ----- */
body.hon {
  --hon-live-banner-h: 126px;
  padding-bottom: var(--hon-live-banner-h) !important;
}
@media (max-width: 781px) {
  body.hon {
    --hon-live-banner-h: 100px;
    padding-bottom: calc(var(--hon-live-banner-h) + var(--hon-tabbar, 56px) + env(safe-area-inset-bottom, 0px)) !important;
  }
}
body.hon.hon-live-banner-collapsed { --hon-live-banner-h: 28px; }
body.hon.hon-live-banner-off { --hon-live-banner-h: 0px; }

/* 番兵がバナーの裏に入っても、本文側の下余白で最後までスクロールできる */
[data-infinite-sentinel] {
  scroll-margin-bottom: calc(var(--hon-live-banner-h, 0px) + var(--hon-tabbar, 0px) + 24px);
}

/* 無限スクロールのローダーと GTranslate をバナーの上に出す */
@media (min-width: 782px) {
  .hon-infinite-status.is-loading {
    bottom: calc(var(--hon-live-banner-h, 96px) + 16px) !important;
  }
  .gt_float_switcher,
  #gt_float_wrapper,
  .gt_float_wrapper,
  .gt_switcher_wrapper {
    bottom: calc(var(--hon-live-banner-h, 96px) + 10px) !important;
  }
}
@media (max-width: 781px) {
  .hon-infinite-status.is-loading {
    bottom: calc(var(--hon-tabbar, 56px) + var(--hon-live-banner-h, 92px) + 16px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .gt_float_switcher,
  #gt_float_wrapper,
  .gt_float_wrapper,
  .gt_switcher_wrapper {
    bottom: calc(var(--hon-tabbar, 56px) + var(--hon-live-banner-h, 92px) + 10px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* フッター PR：ラベルと上下ライン、Stripchat 枠を出さず、上部余白を詰める（hon-site.css は触らない） */
.hon-pr-label,
.hon-pr-stripchat {
  display: none !important;
}
.hon-pr {
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  padding: 8px 0 !important;
  margin-top: 0 !important;
}

/* ----- 一覧カード ----- */
.hon-live-card { min-width: 0; }

.hon-live-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 2px;
  font-family: var(--hon-sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--hon-ink);
  background: rgba(44, 42, 40, 0.78);
  border: 1px solid rgba(228, 207, 168, 0.55);
}

.hon-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hon-accent-rose);
  box-shadow: 0 0 0 0 rgba(201, 164, 148, 0.7);
  animation: hon-live-pulse 1.6s ease-out infinite;
}

@keyframes hon-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 164, 148, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(201, 164, 148, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 164, 148, 0); }
}

.hon-live-pr {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 3px 7px 2px;
  font-family: var(--hon-sans);
  font-size: 8px;
  letter-spacing: 0.28em;
  color: var(--hon-ink-mute);
  background: rgba(44, 42, 40, 0.7);
  border: 1px solid var(--hon-line);
}

.hon-live-card .hon-live-now { color: var(--hon-accent); letter-spacing: 0.2em; }
.hon-live-card .hon-card-meta { flex-wrap: wrap; gap: 8px 14px; }
.hon-live-line { color: var(--hon-ink-soft); }
.hon-live-viewers { font-variant-numeric: tabular-nums; color: var(--hon-ink-mute); }

/* ----- 画面下固定バナー ----- */
.hon-live-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 170;
  width: 100%;
  height: var(--hon-live-banner-h);
  background: var(--hon-surface, #2C2A28);
  border-top: 0;
  box-sizing: border-box;
  /* 上方向の黒シャドウを出すため overflow は visible。タイルのはみ出しは track 側で切る */
  overflow: visible;
  /* 下（SP タブバー）と左右にはみ出さない。上 40px だけ影を見せる */
  clip-path: inset(-40px 0 0 0);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.75);
  font-family: var(--hon-sans);
}
@media (max-width: 781px) {
  .hon-live-banner {
    bottom: calc(var(--hon-tabbar, 56px) + env(safe-area-inset-bottom, 0px));
  }
}
body.hon.hon-live-banner-off .hon-live-banner { display: none; }

.hon-live-banner-bar,
.hon-live-banner-label,
.hon-live-banner-toggle {
  display: none !important;
}
.hon-live-banner-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--hon-accent, #E4CFA8);
}
.hon-live-banner-label .hon-live-pr {
  position: static;
  padding: 1px 6px 0;
  background: transparent;
  border-color: var(--hon-line);
}
.hon-live-banner-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--hon-ink-mute, #B8AFA4);
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.12em;
  cursor: pointer;
  padding: 2px 4px;
}
.hon-live-banner-toggle:hover { color: var(--hon-ink, #F7F3EC); }

.hon-live-banner-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  height: 100%;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hon-live-banner-track::-webkit-scrollbar { display: none; }

.hon-live-bcard {
  position: relative;
  flex: 0 0 auto;
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  background: var(--hon-surface-2, #353330);
}
.hon-live-bthumb {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--hon-surface-2, #353330);
}
.hon-live-bthumb img,
.hon-live-bthumb iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border: 0;
}
.hon-live-bthumb iframe {
  position: absolute;
  inset: -1px;
  z-index: 1;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  pointer-events: none;
  opacity: 0;
  background: transparent;
}
.hon-live-bthumb.is-live iframe { opacity: 1; }
body.hon.hon-live-banner-collapsed .hon-live-banner-track { display: none; }

/* SP: 3列・ライブ映像のみ。隙間なしで画面幅いっぱいに並べる（旧テーマと同じ） */
@media (max-width: 781px) {
  .hon-live-banner-track { gap: 0; padding: 0; }
  .hon-live-bcard { width: calc(100% / 3); }
  .hon-live-bmeta { display: none; }
}

/* PC: 列数は --hon-live-cols。幅いっぱいにちょうど並べ、右端の見切れを出さない。高さ 126px のまま */
@media (min-width: 782px) {
  .hon-live-banner-track {
    display: grid;
    grid-template-columns: repeat(var(--hon-live-cols, 8), minmax(0, 1fr));
    gap: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .hon-live-bcard {
    width: auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }
  .hon-live-bthumb { height: 100%; flex: 1 1 auto; }
  .hon-live-bmeta { display: none; }
  /* Chaturbate: 残るヘッダーをフレーム外へクロップ（映像だけ見せる） */
  .hon-live-bcard[data-hon-live-plat="chaturbate"] .hon-live-bthumb iframe {
    inset: auto;
    top: -18%;
    left: -2%;
    width: 104%;
    height: 136%;
  }
}

.hon-live-bcard.is-private iframe[data-hon-live-player] {
  display: none !important;
  opacity: 0 !important;
}
.hon-live-bbadge {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 4;
  padding: 3px 8px 2px;
  font-family: var(--hon-sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  border: 0;
  border-radius: 3px;
  background: #d0021b;
  box-shadow: none;
  overflow: hidden;
  pointer-events: none;
}
.hon-live-bplat {
  position: absolute;
  bottom: 4px;
  left: 4px;
  z-index: 2;
  padding: 1px 5px;
  font-family: var(--hon-sans);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--hon-ink, #F7F3EC);
  background: rgba(44, 42, 40, 0.82);
  border: 1px solid var(--hon-line, #5c5854);
  pointer-events: none;
}
.hon-live-bplat[data-plat="stripchat"] { border-color: var(--hon-accent-deep, #C4A06A); }
.hon-live-bplat[data-plat="chaturbate"] { border-color: var(--hon-accent, #D4B896); }
.hon-live-bviewers {
  position: absolute;
  bottom: 4px;
  right: 4px;
  z-index: 2;
  padding: 1px 6px 1px 5px;
  font-family: var(--hon-sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--hon-ink, #F7F3EC);
  background: rgba(20, 18, 16, 0.72);
  border-radius: 999px;
  pointer-events: none;
}
.hon-live-bviewers-unit { margin-left: 1px; font-weight: 500; letter-spacing: 0.08em; }
.hon-live-bfav {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 6;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1.5px solid #F7F3EC;
  border-radius: 50%;
  background: rgba(247, 243, 236, 0.94);
  color: #2C2A28;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
@media (max-width: 781px) {
  .hon-live-bfav {
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
  }
  .hon-live-bfav::before {
    width: 14px;
    height: 14px;
    margin: 4px auto 0;
  }
}
.hon-live-bfav::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  margin: 5px auto 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-6.5-4.35-9.33-8.14C.8 10.6 1.2 7.2 3.8 5.7 5.7 4.6 8 5 9.2 6.6L12 10l2.8-3.4C16 5 18.3 4.6 20.2 5.7c2.6 1.5 3 4.9 1.13 7.16C18.5 16.65 12 21 12 21z' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-6.5-4.35-9.33-8.14C.8 10.6 1.2 7.2 3.8 5.7 5.7 4.6 8 5 9.2 6.6L12 10l2.8-3.4C16 5 18.3 4.6 20.2 5.7c2.6 1.5 3 4.9 1.13 7.16C18.5 16.65 12 21 12 21z' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hon-live-bfav.is-on {
  color: #fff;
  border-color: #d0021b;
  background: #d0021b;
  box-shadow: 0 1px 6px rgba(208, 2, 27, 0.55);
}
.hon-live-bfav.is-on::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-6.5-4.35-9.33-8.14C.8 10.6 1.2 7.2 3.8 5.7 5.7 4.6 8 5 9.2 6.6L12 10l2.8-3.4C16 5 18.3 4.6 20.2 5.7c2.6 1.5 3 4.9 1.13 7.16C18.5 16.65 12 21 12 21z' fill='black'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-6.5-4.35-9.33-8.14C.8 10.6 1.2 7.2 3.8 5.7 5.7 4.6 8 5 9.2 6.6L12 10l2.8-3.4C16 5 18.3 4.6 20.2 5.7c2.6 1.5 3 4.9 1.13 7.16C18.5 16.65 12 21 12 21z' fill='black'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .hon-live-dot { animation: none; }
}

/* バナーハートの登録トースト */
.hon-live-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--hon-live-banner-h, 126px) + 16px);
  transform: translateX(-50%) translateY(8px);
  z-index: 180;
  padding: 8px 14px;
  font-family: var(--hon-sans, inherit);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(20, 18, 16, 0.92);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.hon-live-toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (max-width: 781px) {
  .hon-live-toast {
    bottom: calc(var(--hon-tabbar, 56px) + var(--hon-live-banner-h, 100px) + 12px + env(safe-area-inset-bottom, 0px));
  }
}
body.hon.page-mylist .hon-live-toast,
body.hon:has(.hon-mylist-page) .hon-live-toast {
  bottom: calc(var(--hon-tabbar, 0px) + 24px + env(safe-area-inset-bottom, 0px));
}

/* マイリスト: ライブ配信と記事・動画を別セクションに分ける */
.hon-live-mylist {
  margin: 0 0 32px;
}
.hon-live-mylist[hidden] { display: none; }
.hon-live-mylist-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 12px;
}
.hon-mylist-posts-head {
  margin: 8px 0 12px;
  padding-top: 8px;
}
.hon-mylist-posts-head[hidden] { display: none; }
.hon-live-mylist-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: inherit;
}
.hon-live-mylist-grid {
  margin: 0;
}
.hon-live-mylist-card .hon-card-media,
.hon-live-mylist-card .hon-card-thumb {
  position: relative;
  overflow: hidden;
}
.hon-live-mylist-card .hon-live-bfav {
  top: 8px;
  right: 8px;
  z-index: 6;
}
.hon-live-mylist-card iframe[data-hon-live-player] {
  position: absolute;
  inset: -1px;
  z-index: 1;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  border: 0;
  pointer-events: none;
  opacity: 0;
  background: transparent;
}
.hon-live-mylist-card .hon-card-thumb.is-live iframe[data-hon-live-player],
.hon-live-mylist-card.is-live iframe[data-hon-live-player] {
  opacity: 1;
}
.hon-live-mylist-card[data-hon-live-plat="chaturbate"] iframe[data-hon-live-player] {
  inset: auto;
  top: -10%;
  left: -2%;
  width: 104%;
  height: 120%;
}
.hon-live-offline {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 5;
  padding: 4px 9px 3px;
  font-family: var(--hon-sans, inherit);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  background: rgba(12, 10, 9, 0.92);
  border: 1px solid rgba(228, 207, 168, 0.55);
  border-radius: 3px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.hon-live-mylist-card.is-offline .hon-live-badge { display: none; }
.hon-live-mylist-card:not(.is-offline) .hon-live-offline { display: none; }
/* オフラインは画像上のバッジ（とプレースホルダー中央）だけ。カード下は名前のみ。 */
.hon-live-mylist-card.is-offline .hon-card-cat,
.hon-live-mylist-card.is-offline .hon-card-meta {
  display: none;
}
.hon-live-mylist-card.is-offline .hon-card-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hon-live-mylist-card.is-offline .hon-card-img {
  filter: grayscale(0.35) brightness(0.78);
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.hon-live-mylist-card.is-offline .hon-card-img.is-letterboxed {
  transform: scale(var(--hon-lb-scale, 1.778));
  transform-origin: center center;
}
.hon-live-mylist-card.is-offline .hon-card-media {
  background: linear-gradient(165deg, var(--hon-surface-2, #353330) 0%, var(--hon-surface, #2C2A28) 100%);
}
.hon-live-mylist-card.is-offline iframe[data-hon-live-player] {
  display: none !important;
  opacity: 0 !important;
}
.hon-live-mylist-card.is-offline .hon-card-img.is-failed {
  display: none;
}
.hon-live-ph {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 14px 16px;
  text-align: center;
  background: linear-gradient(165deg, #3d3a36 0%, var(--hon-surface, #2C2A28) 48%, #241f1c 100%);
  pointer-events: none;
}
.hon-live-mylist-card.is-offline:not(.has-poster) .hon-live-ph {
  display: flex;
}
.hon-live-mylist-card:not(.is-offline) .hon-live-ph {
  display: none;
}
.hon-live-ph__name {
  font-family: var(--hon-sans, inherit);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.35;
  color: var(--hon-accent, #E4CFA8);
  word-break: break-word;
  max-width: 100%;
}
.hon-live-ph__state {
  font-family: var(--hon-sans, inherit);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #fff;
}
@media (max-width: 781px) {
  .hon-live-offline { font-size: 11px; padding: 4px 8px 3px; }
  .hon-live-ph__name { font-size: 13px; }
}
