/* feed.css — フィード画面（縦スワイプ + FANZA litevideo iframe） */

html, body { height: 100%; overscroll-behavior: none; }
body[data-page="feed"] {
  background: #000;
  color: var(--fg);
  overflow: hidden;
  touch-action: none;
}

/* ── 上部ヘッダ ────────────────────────────── */
.feed-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent);
  pointer-events: none;
}
.feed-header > * { pointer-events: auto; }
.brand-mini {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .04em;
  background: linear-gradient(135deg, #ff3060, #ff8030);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.actress-fav-header {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.actress-fav-header svg { width: 18px; height: 18px; fill: transparent; }
.actress-fav-header.favorited svg { fill: var(--accent); stroke: var(--accent); }
.pos-info {
  margin-left: auto;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  font-variant-numeric: tabular-nums;
}
.feed-menu-btn { margin-left: 8px; }

/* ── プレイヤーステージ ────────────────────── */
.player-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.player-frame {
  position: relative;
  width: min(100vw, calc((100vh - var(--tabbar-h-feed, 56px)) * 16 / 9));
  aspect-ratio: 16 / 9;
  max-width: 100vw;
  max-height: calc(100vh - var(--tabbar-h-feed, 56px));
  background: #000;
}
.player-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}
/* ローディング中のプレースホルダ画像 */
.player-cover {
  position: absolute;
  inset: 0;
  background-color: #000;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
}
.player-cover.show { opacity: 1; }
.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.player-spinner {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: zap-spin 1s linear infinite;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.player-spinner.show { opacity: 1; }
@keyframes zap-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ── ページ送り矢印ボタン ────────────────────
   iframe（DMM litevideo）が wheel/pointer イベントを奪うため、
   PC では明示的なボタンが必須。画面の左右端、縦中央配置。 */
.nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  width: 48px;
  height: 64px;
  border-radius: 8px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: background .15s ease;
}
.nav-arrow:hover { background: rgba(0,0,0,0.8); }
.nav-arrow-up   { left: 12px; }
.nav-arrow-down { right: 12px; }
/* 矢印の向きは「左=前、右=次」（ザッピング横向きアロー）。
   ※ id 名は up/down のままだが視覚は ‹ / › で左右配置。 */

/* ── スワイプ誘導（モバイル初回のみ） ─────── */
.swipe-hint {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h-feed, 56px) + 90px);
  transform: translateX(-50%);
  z-index: 20;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  pointer-events: none;
  animation: zap-swipe-hint 2s ease-in-out infinite;
}
@keyframes zap-swipe-hint {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: .8; }
  50%      { transform: translateX(-50%) translateY(-8px); opacity: 1; }
}

/* ── 右下アクション ────────────────────────── */
.ctrl-right {
  position: fixed;
  right: 12px;
  bottom: calc(var(--tabbar-h-feed, 56px) + 16px);
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.ctrl-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.action-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  text-decoration: none;
}
.action-btn-actress {
  padding: 0;
  overflow: hidden;
}
.actress-icon-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.action-btn.favorited { color: var(--accent); border-color: var(--accent); }
.ctrl-tag {
  font-size: 10px;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ── 詳細パネル ────────────────────────────── */
.detail-panel {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.detail-panel[hidden] { display: none; }
.detail-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}
.detail-panel-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  background: var(--bg-2);
  border-radius: 14px 14px 0 0;
  padding: 18px 18px 30px;
  max-height: 70vh;
  overflow-y: auto;
}
.detail-panel-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px; height: 32px;
  font-size: 22px;
  color: var(--fg-mute);
}
.detail-panel-title {
  margin: 0 28px 12px 0;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
}
.detail-panel-list {
  margin: 0;
  padding: 0;
}
.dpr {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.dpr dt {
  flex: 0 0 64px;
  color: var(--fg-mute);
  font-size: 12px;
  margin: 0;
}
.dpr dd {
  flex: 1;
  margin: 0;
  word-break: break-all;
}
.detail-fanza-link {
  display: inline-block;
  margin-top: 14px;
  background: var(--accent);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.detail-tag-chip {
  display: inline-block;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  margin: 2px 4px 2px 0;
  color: var(--fg);
}
.detail-panel-links {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 11px;
}
.detail-panel-links a {
  color: var(--fg-mute);
  text-decoration: none;
}
.detail-panel-links a:hover { color: var(--fg); }

/* ── 下部タブバー（feed 用に変数だけ上書き、見た目は共通） ── */
.feed-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  height: var(--tabbar-h-feed, 56px);
  display: flex;
  background: rgba(10,10,12,0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.feed-tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: var(--fg-mute);
  padding: 6px 2px;
}
.feed-tabbar a svg { width: 22px; height: 22px; }
.feed-tabbar a.active { color: var(--accent); }

/* ── 横向きスマホ：下部メニュー薄め ──────── */
@media (max-width: 1023px) and (orientation: landscape) {
  .feed-tabbar { opacity: .25; }
  .feed-tabbar:hover, .feed-tabbar:focus-within { opacity: 1; }
}
