/* =====================================================================
   スキピック — 暗い画面で、作品（サムネイル・動画）を主役にするデザイン
   方針（調査メモは README.md）
   ・背景は青みのない黒。UI自体には色を付けず、色は作品の画像・動画から出す
     （参考: VoltAgent/awesome-design-md の Spotify 分析 "content-first darkness"）
   ・色は購入ボタンのオレンジ1色だけ（遷移先の myfans と印象をそろえる）
   ・グラデーションの飾り、光る効果、枠線つきの丸いカードは使わない
   ===================================================================== */
:root {
  --bg: #121212;
  --surface: #1a1a1a;
  --surface-2: #232323;
  --surface-3: #2c2c2c;
  --line: #2e2e2e;
  --text: #ffffff;
  --text-2: #d0d0d0;
  --muted: #a7a7a7;
  --accent: #ff5a1f;
  --accent-ink: #121212;
  --radius: 6px;
  --wrap: 1280px;
  --font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html:not(.age-ok) body { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: "palt" 1;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
main h1 { font-size: 24px; font-weight: 900; line-height: 1.35; margin: 20px 0 6px; letter-spacing: 0.01em; }
.lead { color: var(--muted); margin: 0 0 14px; font-size: 13px; }
.empty { color: var(--muted); padding: 24px 0; }
.crumb { margin: 16px 0 0; font-size: 12px; color: var(--muted); }
.crumb a:hover { color: var(--text); }
.crumb span { margin: 0 8px; }

/* ---------- ボタン・小物 ---------- */
.cta, .btn, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}
.cta:hover, .btn:hover { filter: brightness(1.08); }
.btn-outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--muted); }
.cta-lg { width: 100%; min-height: 54px; font-size: 17px; }

.fav {
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.fav:hover { background: #3a3a3a; }
.fav[aria-pressed="true"] { color: var(--accent); }

.badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  background: #fff;
  color: #121212;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.6;
}
.badge-coupon { background: var(--accent); color: var(--accent-ink); }

.avatar, .initial {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text);
  font-weight: 900;
}
.initial { width: 28px; height: 28px; font-size: 12px; }
.avatar { width: 64px; height: 64px; font-size: 24px; }
.avatar-lg { width: 88px; height: 88px; font-size: 34px; }

.more { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.more:hover { color: var(--text); }

/* ---------- ヘッダー ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(18, 18, 18, 0.96); }
.header-row { display: flex; align-items: center; gap: 10px; height: 54px; }
.logo { font-weight: 900; font-size: 21px; letter-spacing: 0.04em; white-space: nowrap; }
.pr-badge { flex: none; padding: 0 4px; border-radius: 3px; background: var(--surface-3); color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.7; }
.search { margin-left: auto; flex: 1 1 auto; min-width: 0; max-width: 340px; }
.search input {
  width: 100%;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.search input::placeholder { color: var(--muted); }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
}
.tabs a:hover { background: var(--surface-3); }
.tabs a[aria-current="page"] { background: var(--text); color: #121212; }

/* ---------- トップ ---------- */
.intro { padding: 18px 0 6px; }
.intro-title { margin: 0 !important; font-size: 22px !important; }
.intro-text { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.intro-text a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 12px 0 0; padding: 0 0 4px; list-style: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.chips a:hover { background: var(--surface-2); }
.chips span { color: var(--muted); font-weight: 400; font-size: 12px; }
main > .chips { flex-wrap: nowrap; }
.genre-index .chips { flex-wrap: wrap; overflow: visible; }

section { margin: 26px 0 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 19px; font-weight: 900; }
.section-coupon .section-head h2::after { content: "COUPON"; margin-left: 8px; padding: 1px 6px; border-radius: 3px; vertical-align: 3px; background: var(--accent); color: var(--accent-ink); font-size: 10px; letter-spacing: 0.08em; }

/* ---------- 作品のサムネイル ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 10px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 14px; } }
@media (min-width: 960px) { .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 42%;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px;
  scroll-padding: 0 16px;
}
.rail::-webkit-scrollbar { display: none; }
.rail .tile { scroll-snap-align: start; }
@media (min-width: 640px) { .rail { grid-auto-columns: 28%; gap: 14px; } }
@media (min-width: 960px) { .rail { grid-auto-columns: calc((100% - 56px) / 5); margin: 0; padding: 0; } }

.tile { min-width: 0; }
.tile-media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.tile-media img, .tile-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-media::after {
  /* 下の価格を読みやすくするための影（飾りではなく文字のため） */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  pointer-events: none;
}
.tile-rank {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  min-width: 30px;
  padding: 2px 8px 3px;
  border-radius: 0 0 var(--radius) 0;
  background: #fff;
  color: #121212;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  line-height: 1.4;
}
.tile-badges { position: absolute; z-index: 1; top: 6px; right: 6px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tile-price { position: absolute; z-index: 1; left: 8px; bottom: 6px; font-size: 13px; font-weight: 900; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.tile-play { position: absolute; z-index: 1; right: 8px; bottom: 6px; font-size: 12px; opacity: 0.9; }

/* 動画・画像がない作品の「文字ポスター」 */
.poster {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 40px 12px 32px;
  background: var(--surface-2);
}
.poster-text { order: 1; }
.poster-creator { order: 2; font-size: 11px; font-weight: 700; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster-genres { order: 3; }
.poster-text {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.poster-genres { font-size: 11px; color: var(--muted); }
.poster-genres:empty { display: none; }
@media (hover: hover) { .tile:hover .poster { background: var(--surface-3); } }

.tile-body { padding-top: 8px; }
.tile-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.tile-title a:hover { text-decoration: underline; }
.tile-creator { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-creator:hover { color: var(--text); }
.tile-actions { display: flex; gap: 6px; margin-top: 8px; }
.tile-actions .cta { flex: 1; min-width: 0; padding: 0 8px; }

/* ---------- クリエイター ---------- */
.people {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 96px;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 -16px;
  padding: 0 16px;
}
.people::-webkit-scrollbar { display: none; }
.creator-index .people { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); margin: 16px 0 0; padding: 0; overflow: visible; }
.person { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.person .avatar { margin-bottom: 4px; }
.person:hover .avatar { background: #3a3a3a; }
.person-name { font-size: 13px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-meta { font-size: 11px; color: var(--muted); }

.profile-head { display: flex; align-items: center; gap: 16px; margin: 18px 0 10px; }
.profile-head .story-title { margin: 0 !important; }
.byline-sub { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.creator-profile { max-width: 640px; }
.creator-profile .cta-lg { max-width: 420px; }

/* ---------- 作品ページ ---------- */
.watch { display: grid; gap: 18px; margin-top: 14px; }
@media (min-width: 860px) { .watch { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 36px; align-items: start; } }
.watch-media { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.watch-media img, .watch-media .player { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.watch-media .player { object-fit: contain; }
.watch-info { max-width: 560px; }
.poster-lg { padding: 22px 22px 26px; justify-content: center; }
.poster-lg .poster-text { font-size: 24px; -webkit-line-clamp: 8; }
.poster-lg .poster-creator, .poster-lg .poster-genres { font-size: 13px; }
@media (max-width: 859px) {
  .watch-media { max-width: 100%; max-height: 72vh; }
  .watch-media.is-poster { aspect-ratio: 4 / 3; }
  .poster-lg .poster-text { font-size: 21px; -webkit-line-clamp: 5; }
}

.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.kicker a:hover { color: var(--text); }
.kicker-genres:empty { display: none; }
.story-title { margin: 8px 0 0 !important; font-size: 23px !important; font-weight: 900; line-height: 1.4 !important; overflow-wrap: anywhere; }
.story-lead { margin: 10px 0 0; font-size: 15px; line-height: 1.7; color: var(--text-2); }
.byline { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 13px; font-weight: 700; }
.byline a:hover { text-decoration: underline; }

.buy { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; padding: 16px; border-radius: var(--radius); background: var(--surface); }
.buy-price { display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.buy-price strong { font-size: 30px; font-weight: 900; color: var(--text); letter-spacing: 0; }
.coupon { padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); }
.coupon-title { margin: 0 0 4px; font-weight: 900; font-size: 13px; color: var(--accent); }
.coupon p:not(.coupon-title) { margin: 0; font-size: 12px; color: var(--muted); }
.buy-note { margin: 0; font-size: 11px; line-height: 1.7; color: var(--muted); }
.buy-note a { text-decoration: underline; text-underline-offset: 2px; }
.buy-bottom { margin: 8px 0 34px; max-width: 520px; }
.buy-lead { margin: 0; font-weight: 900; font-size: 16px; line-height: 1.6; }

.watch-more { max-width: 760px; margin-top: 30px; }
.story-section { margin: 0 0 28px; }
.story-section h2 { margin: 0 0 10px; font-size: 17px; font-weight: 900; }
.story-text { margin: 0; font-size: 15px; line-height: 1.85; color: var(--text-2); }
.story-section .byline { margin: 0 0 10px; }
.byline-sub::before { content: none; }
.numbered { list-style: none; counter-reset: n; margin: 0; padding: 0; }
.numbered li { counter-increment: n; position: relative; padding: 9px 0 9px 34px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.6; color: var(--text-2); }
.numbered li::before { content: counter(n); position: absolute; left: 0; top: 9px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--text); font-size: 12px; font-weight: 900; }
.dashed { list-style: none; margin: 0; padding: 0; }
.dashed li { position: relative; padding: 4px 0 4px 18px; color: var(--text-2); }
.dashed li::before { content: "・"; position: absolute; left: 0; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 14px 0; }
.facts div { padding: 10px 12px; border-radius: var(--radius); background: var(--surface); }
.facts dt { font-size: 11px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 900; font-size: 15px; }

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(18, 18, 18, 0.97);
  border-top: 1px solid var(--line);
}
.sticky-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.sticky-title { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-price { font-weight: 900; font-size: 17px; }
.sticky-cta .cta { min-height: 44px; padding: 0 22px; font-size: 15px; }
@media (min-width: 860px) { .sticky-cta { display: none !important; } }
body.has-sticky .site-footer { padding-bottom: 96px; }

/* ---------- 文章ページ ---------- */
.prose { max-width: 720px; }
.prose h2 { margin: 28px 0 8px; font-size: 17px; font-weight: 900; }
.prose p, .prose li { font-size: 15px; line-height: 1.85; color: var(--text-2); }
.prose p { margin: 0 0 10px; }
.prose ul { margin: 0; padding-left: 1.3em; }
.prose strong { color: var(--text); }
.prose a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- フッター ---------- */
.site-footer { margin-top: 48px; padding: 32px 0 40px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.9; color: var(--muted); }
.site-footer p { margin: 0 0 8px; }
.site-footer a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.disclosure strong { display: inline-block; margin-right: 6px; padding: 0 4px; border-radius: 3px; background: var(--surface-3); color: var(--text-2); font-size: 10px; line-height: 1.6; }
.copy { margin-top: 16px !important; font-weight: 700; color: var(--text-2); }

/* ---------- 年齢確認 ---------- */
.age-gate { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.94); }
html.age-ok .age-gate { display: none; }
.age-box { width: 100%; max-width: 400px; padding: 28px 22px; border-radius: 10px; background: var(--surface); text-align: center; }
.age-eyebrow { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.age-box h2 { margin: 6px 0 10px; font-size: 22px; font-weight: 900; }
.age-box p { font-size: 13px; color: var(--text-2); }
.age-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.btn-primary, .btn-ghost { min-height: 48px; border: 0; border-radius: 999px; font: inherit; font-weight: 900; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: var(--surface-3); color: var(--text); }
.age-denied { font-weight: 700; margin-top: 20px; }

@media (max-width: 380px) {
  .logo { font-size: 19px; }
  .tile-actions .fav { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
