:root {
  --bg: #0b0b0f;
  --fg: #f4f4f6;
  --muted: #a3a3ad;
  --accent: #ff3b5c;
  --accent2: #ffb020;
  --chip: rgba(255, 255, 255, .14);
  --sheet: #17171d;
  --top-h: 92px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---- 年齢確認 ---- */
.gate { position: fixed; inset: 0; z-index: 100; background: rgba(5,5,8,.96);
  display: grid; place-items: center; padding: 24px; }
.gate-card { max-width: 380px; text-align: center; display: grid; gap: 14px; }
.gate-card h1 { margin: 0; font-size: 22px; }
.gate-card p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 14px; }
.gate-card .pr { font-size: 12px; }
.btn { display: inline-block; padding: 13px 18px; border-radius: 999px; font-weight: 700;
  text-decoration: none; text-align: center; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { border: 1px solid #44444c; color: var(--muted); }

/* ---- 上部バー ---- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 20; padding: max(8px, env(safe-area-inset-top)) 10px 6px;
  background: linear-gradient(rgba(0,0,0,.7), rgba(0,0,0,0)); display: grid;
  grid-template-columns: 1fr auto; gap: 6px; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { padding: 7px 11px; color: var(--muted); font-weight: 700; font-size: 15px; white-space: nowrap; }
.tabs button.on { color: var(--fg); box-shadow: inset 0 -2px 0 var(--fg); }
.topbar-actions { display: flex; gap: 4px; }
.icon { width: 40px; height: 40px; border-radius: 50%; font-size: 18px; display: grid; place-items: center; position: relative; }
.icon span { position: absolute; top: 2px; right: 0; font-size: 10px; background: var(--accent);
  border-radius: 999px; padding: 1px 5px; min-width: 16px; }
.icon span:empty { display: none; }
.active-filters { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.active-filters:empty { display: none; }
.fchip { background: var(--accent); color: #fff; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.fchip::after { content: " ✕"; opacity: .8; }

/* ---- フィード ---- */
.feed { height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain;
  scrollbar-width: none; outline: none; }
.feed::-webkit-scrollbar { display: none; }
.slide { position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always;
  overflow: hidden; display: grid; grid-template-rows: 1fr auto; }
.slide .bg { position: absolute; inset: -40px; background-size: cover; background-position: center;
  filter: blur(28px) brightness(.35); transform: scale(1.1); }
.stage { position: relative; display: grid; place-items: center; padding: var(--top-h) 0 0; min-height: 0; }
.player { position: relative; width: min(100vw, 960px); aspect-ratio: 3 / 2; max-height: 100%;
  background: #000; overflow: hidden; }
.player .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.player .play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 54px;
  color: #fff; text-shadow: 0 2px 12px #000; }
.player.loaded .play { display: none; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; }
.player .demo-player { position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  font-size: 14px; color: #fff; padding: 20px; background: rgba(0,0,0,.35); }

.info { position: relative; padding: 12px 76px calc(64px + env(safe-area-inset-bottom)) 14px;
  background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.85) 40%); }
.title { font-size: 15px; font-weight: 700; line-height: 1.45; margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.meta .sale { color: var(--accent2); font-weight: 700; }
.stars { color: var(--accent2); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { max-height: 210px; overflow-y: auto; }
.chip { background: var(--chip); padding: 5px 10px; border-radius: 999px; font-size: 13px; white-space: nowrap; }
.chip.actress { background: rgba(255, 59, 92, .25); }
.chip.on { background: var(--accent); color: #fff; }
.slide .chips { max-height: 64px; overflow: hidden; }
.cta { position: absolute; left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom));
  background: var(--accent); color: #fff; text-decoration: none; text-align: center; font-weight: 800;
  padding: 13px; border-radius: 12px; font-size: 15px; box-shadow: 0 4px 18px rgba(255,59,92,.35); }
.cta small { font-weight: 600; opacity: .9; margin-left: 6px; }

.rail { position: absolute; right: 8px; bottom: calc(80px + env(safe-area-inset-bottom)); display: grid; gap: 14px;
  justify-items: center; z-index: 2; }
.rail button { display: grid; justify-items: center; gap: 2px; font-size: 26px; text-shadow: 0 1px 6px #000; }
.rail button small { font-size: 11px; color: var(--fg); }
.rail .fav.on { color: var(--accent); }

.loading-slide { display: grid; place-items: center; color: var(--muted); }
.empty { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted);
  padding: 30px; z-index: 5; pointer-events: none; }
.demo-badge { position: fixed; right: 10px; top: calc(52px + env(safe-area-inset-top)); z-index: 30; font-size: 10px; opacity: .8;
  background: #333; padding: 3px 10px; border-radius: 999px; color: #ddd; pointer-events: none; }

/* ---- シート ---- */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; }
.sheet-body { width: 100%; max-width: 640px; margin: 0 auto; max-height: 88dvh; overflow-y: auto; background: var(--sheet);
  border-radius: 18px 18px 0 0; padding: 14px 16px calc(24px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet h2 { margin: 0; font-size: 18px; }
.sheet h3 { font-size: 13px; color: var(--muted); margin: 18px 0 8px; }
.sheet form { display: flex; gap: 8px; margin-top: 10px; }
.sheet input[type=search] { flex: 1; width: 100%; background: #23232b; border: 1px solid #33333d; color: var(--fg);
  border-radius: 10px; padding: 11px 12px; font-size: 16px; margin-bottom: 8px; }
.sheet form input { margin-bottom: 0; }
.sheet .btn { padding: 10px 16px; }
.actress-chip { display: flex; align-items: center; gap: 6px; }
.actress-chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.fav-item { position: relative; text-align: left; font-size: 12px; line-height: 1.4; }
.fav-item img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 8px; background: #222; display: block; }
.fav-item span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.fav-item .rm { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.7); border-radius: 50%; width: 24px; height: 24px; }

.toast { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); background: rgba(30,30,36,.95);
  padding: 9px 16px; border-radius: 999px; font-size: 13px; z-index: 60; }
.pr-foot { position: fixed; bottom: 0; left: 0; right: 0; text-align: center; font-size: 10px; color: #777;
  padding: 0 0 max(2px, env(safe-area-inset-bottom)); z-index: 10; pointer-events: none; }
.pr-foot a { pointer-events: auto; color: #999; }

@media (min-width: 900px) {
  .info { max-width: 960px; margin: 0 auto; width: 100%; }
  .rail { right: calc(50% - 520px); }
}
