:root {
  --bg: #0b0b0f;
  --fg: #f5f5f7;
  --muted: #a1a1aa;
  --accent: #ff3b6b;
  --accent-2: #ff8a3d;
  --card: #17171d;
  --top-h: 52px;
}
* { 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", "Yu Gothic UI", sans-serif; }
body { overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 20px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.btn.ghost { background: #26262e; color: var(--fg); }
.btn.small { padding: 8px 14px; font-size: 14px; }

/* 年齢確認 */
.age-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: 16px; background: radial-gradient(circle at 30% 20%, #2a1020, #08080b 70%); }
.age-card { width: min(420px, 100%); background: var(--card); border-radius: 20px; padding: 28px 22px;
  text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.age-badge { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  border: 3px solid var(--accent); color: var(--accent); font-weight: 800; font-size: 22px; }
.age-card h1 { font-size: 22px; margin: 14px 0 8px; }
.age-card p { color: var(--muted); line-height: 1.7; margin: 8px 0; font-size: 14px; }
.age-actions { display: grid; gap: 10px; margin-top: 18px; }
.small { font-size: 15px !important; color: var(--fg) !important; }
.tiny { font-size: 11px !important; margin-top: 16px !important; }

/* ヘッダー */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: calc(var(--top-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(rgba(0,0,0,.55), transparent); pointer-events: none; }
.top > * { pointer-events: auto; }
.tabs { display: flex; gap: 4px; }
.tab { padding: 8px 12px; font-weight: 700; color: rgba(255,255,255,.6); font-size: 15px; position: relative; }
.tab.active { color: #fff; }
.tab.active::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 22px; height: 3px;
  transform: translateX(-50%); border-radius: 2px; background: #fff; }
.icon-btn { position: absolute; right: 10px; top: calc(env(safe-area-inset-top) + 8px); padding: 6px; }
.search { position: fixed; z-index: 21; top: calc(var(--top-h) + env(safe-area-inset-top)); left: 12px; right: 12px;
  display: flex; gap: 8px; }
.search input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 0;
  background: rgba(30,30,38,.95); color: var(--fg); font-size: 16px; }
.cats { position: fixed; z-index: 19; left: 50%; transform: translateX(-50%);
  top: calc(var(--top-h) + env(safe-area-inset-top) - 6px); display: flex; gap: 2px;
  background: rgba(0,0,0,.4); border-radius: 999px; padding: 3px; }
.cat { padding: 4px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.65); }
.cat.active { background: rgba(255,255,255,.92); color: #111; }
.demo-banner { position: fixed; z-index: 19; left: 50%; transform: translateX(-50%);
  top: calc(var(--top-h) + env(safe-area-inset-top) + 30px); background: rgba(255,138,61,.18); color: #ffc79e;
  border: 1px solid rgba(255,138,61,.4); font-size: 11px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

/* フィード */
.feed { height: 100dvh; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.slide { position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always;
  overflow: hidden; display: grid; place-items: center; }
.bg { position: absolute; inset: -20px; background-size: cover; background-position: center;
  filter: blur(22px) brightness(.45); transform: scale(1.1); }
.player { position: relative; width: 100%; max-width: 720px; aspect-ratio: 3 / 2; background: #000 center / contain no-repeat;
  display: grid; place-items: center; }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player video { object-fit: contain; }
.player.tall { aspect-ratio: auto; height: 100dvh; max-width: none; background-color: transparent; }
.play { display: grid; justify-items: center; gap: 6px; font-size: 13px; font-weight: 700; text-shadow: 0 1px 4px #000; }
.demo-art { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px;
  font-size: 13px; color: rgba(255,255,255,.8); }

.side { position: absolute; right: 8px; bottom: calc(150px + env(safe-area-inset-bottom)); display: grid; gap: 18px; z-index: 2; }
.side-btn { display: grid; justify-items: center; gap: 2px; font-size: 11px; }
.side-btn svg { fill: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.side-btn.on svg { fill: var(--accent); }

.info { position: absolute; left: 0; right: 64px; bottom: 0; z-index: 2;
  padding: 16px 14px calc(34px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.pr { display: inline-block; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,.18); letter-spacing: .05em; }
.title { margin: 6px 0 4px; font-size: 15px; line-height: 1.45; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { margin: 0 0 6px; font-size: 12px; color: #d4d4d8; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.14); }
.cta { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-weight: 800;
  text-decoration: none; font-size: 15px; box-shadow: 0 6px 20px rgba(255,59,107,.35); }
.cta small { font-weight: 600; opacity: .9; }

.empty { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px;
  color: var(--muted); line-height: 1.8; white-space: pre-line; pointer-events: none; }
.legal { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; text-align: center; font-size: 10px;
  color: rgba(255,255,255,.45); padding: 4px 0 calc(4px + env(safe-area-inset-bottom)); pointer-events: none; }
.legal a { pointer-events: auto; color: rgba(255,255,255,.6); text-decoration: none; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 50; background: rgba(30,30,38,.95);
  padding: 10px 16px; border-radius: 999px; font-size: 13px; }

@media (min-width: 900px) {
  .feed { max-width: 480px; margin: 0 auto; border-left: 1px solid #1f1f27; border-right: 1px solid #1f1f27; }
  .player { aspect-ratio: 3 / 2; }
  .top { max-width: 480px; margin: 0 auto; }
}
