:root {
  --bg: #0b0b0f;
  --panel: #16161d;
  --panel2: #1f1f29;
  --line: #2a2a36;
  --text: #f4f4f7;
  --sub: #a4a4b3;
  --accent: #ff2e63;
  --accent2: #ff7a45;
  --gold: #ffc53d;
  --topH: 52px;
  --safeB: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

/* 上の帯 */
.top { position: fixed; inset: 0 0 auto 0; height: var(--topH); z-index: 20; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: linear-gradient(to bottom, rgba(11,11,15,.96), rgba(11,11,15,.82)); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255,255,255,.06); }
.brand { font-weight: 800; font-size: 15px; letter-spacing: .02em; white-space: nowrap; padding: 6px 2px; }
.brand span { color: var(--accent); }
.tabs { display: flex; gap: 2px; margin: 0 auto; background: var(--panel); border-radius: 999px; padding: 3px; }
.tabs button { padding: 6px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--sub); white-space: nowrap; }
.tabs button.on { background: var(--accent); color: #fff; }
.tools { display: flex; gap: 2px; }
.icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; }
.icon svg { width: 21px; height: 21px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.on { background: var(--panel2); }
.icon.on svg { stroke: var(--accent); }
@media (max-width: 380px) { .brand { font-size: 13px; } .tabs button { padding: 6px 8px; font-size: 12px; } .icon { width: 32px; } }

.filterbar { position: fixed; top: var(--topH); left: 0; right: 0; z-index: 19; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 12px; background: rgba(255,46,99,.14); color: #ffd0dc; font-size: 13px; font-weight: 700; }
.filterbar button { background: var(--accent); color: #fff; border-radius: 999px; padding: 3px 12px; font-size: 12px; }

main { position: fixed; inset: 0; }

/* リール */
.reel { height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; overscroll-behavior: contain; overflow-anchor: none; scrollbar-width: none; }
.reel::-webkit-scrollbar { display: none; }
.slide { position: relative; height: 100dvh; min-height: 100vh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #000; }
@supports (height: 100dvh) { .slide { min-height: 0; } }
.slide.state, .slide.linecard { display: flex; flex-direction: column; padding: calc(var(--topH) + 10px) 20px calc(14px + var(--safeB)); background: var(--bg); }

/* 縦型（ショート動画のような全画面）。パソコンでは真ん中に縦長の枠を置く */
.frame { position: relative; height: 100%; width: min(100%, calc(100dvh * 9 / 16)); margin: 0 auto; overflow: hidden; background: #000; }
@media (max-width: 600px) { .frame { width: 100%; } }
.stage { position: absolute; inset: 0; overflow: hidden; background: #000; }
.stage iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; }
.stage .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 88% 50%; }
.reel[data-fit="contain"] .stage .poster { object-fit: contain; object-position: 50% 42%; }
.stage .tapplay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.18); }
.stage .tapplay span { width: 74px; height: 74px; border-radius: 50%; background: rgba(255,46,99,.92); display: grid; place-items: center; box-shadow: 0 8px 30px rgba(255,46,99,.55); }
.stage .tapplay svg { width: 30px; height: 30px; fill: #fff; margin-left: 5px; }
.stage .tapplay em { position: absolute; top: calc(50% + 50px); font-style: normal; font-size: 13px; font-weight: 700; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.8); }

/* 文字を読みやすくする上下の影。指の操作は素通りさせる */
.shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0,0,0,.55) 0, rgba(0,0,0,0) 110px), linear-gradient(to top, rgba(0,0,0,.85) 0, rgba(0,0,0,.55) 150px, rgba(0,0,0,0) 330px); }
/* 左端は、再生画面の上でも必ず払えるように、指を受ける帯を置く */
.swipezone { position: absolute; left: 0; top: 0; bottom: 0; width: 14%; z-index: 2; }

.slide .rank { position: absolute; top: calc(var(--topH) + 10px); left: 12px; z-index: 3; font-weight: 900; font-size: 13px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.22); padding: 3px 10px; border-radius: 999px; }
.slide .rank.top3 { background: linear-gradient(135deg, var(--gold), #ff9f1c); color: #1b1200; border: 0; }

/* 右の縦の列（いいね・保存・共有・画像・表示切り替え） */
.side { position: absolute; right: 8px; bottom: calc(118px + var(--safeB)); z-index: 3; display: flex; flex-direction: column; gap: 14px; align-items: center; pointer-events: none; }
.sbtn { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 56px; color: #fff; font-size: 11px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.sbtn svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 3px rgba(0,0,0,.7)); }
.sbtn.on svg { fill: var(--accent); stroke: var(--accent); }
.sbtn.on { color: #ffb3c6; }

/* 下に重ねる文字と購入ボタン */
.bottom { position: absolute; left: 12px; right: 12px; bottom: calc(10px + var(--safeB)); z-index: 3; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.bottom > * { pointer-events: auto; }
.bottom .txt { margin-right: 64px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.bottom .txt > * { pointer-events: auto; }
.title { font-size: 14.5px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; text-shadow: 0 1px 4px rgba(0,0,0,.9); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: #d9d9e2; align-items: center; text-shadow: 0 1px 3px rgba(0,0,0,.9); }
.meta .stars { color: var(--gold); font-weight: 800; }
.meta .price { color: #fff; font-weight: 800; }
.chips { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.25); color: #fff; backdrop-filter: blur(4px); }
.chip.actress { background: rgba(255,46,99,.35); border-color: rgba(255,46,99,.7); }

.buy { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-size: 16px; font-weight: 900; text-decoration: none; box-shadow: 0 8px 24px rgba(255,46,99,.4); position: relative; flex: none; }
.buy .pr { position: absolute; top: 5px; right: 8px; font-size: 10px; font-weight: 700; background: rgba(0,0,0,.28); padding: 1px 6px; border-radius: 6px; }
.buy svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.slide .small { text-align: center; font-size: 10px; color: #a0a0b0; flex: none; text-shadow: 0 1px 2px rgba(0,0,0,.9); }
.slide .small a { color: #c2c2cf; }

.navbtns { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: none; flex-direction: column; gap: 8px; z-index: 4; }
.navbtns button { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); display: grid; place-items: center; }
.navbtns svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.4; }
@media (hover: hover) and (min-width: 820px) { .navbtns { display: flex; } }

/* リールのときは上の帯を透明にして、動画の上に重ねる */
body.in-reel .top { background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0)); border-bottom: 0; backdrop-filter: none; }
body.in-reel .tabs { background: rgba(0,0,0,.35); }

/* LINE 登録の差し込み */
.slide.linecard { justify-content: center; align-items: center; text-align: center; gap: 14px; }
.linecard h2 { font-size: 22px; margin: 0; line-height: 1.4; }
.linecard p { color: var(--sub); margin: 0; font-size: 14px; line-height: 1.7; }
.linebtn { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 360px; height: 56px; border-radius: 14px; background: #06c755; color: #fff; font-weight: 900; font-size: 17px; text-decoration: none; position: relative; }
.linebtn .pr { position: absolute; top: 5px; right: 8px; font-size: 10px; background: rgba(0,0,0,.2); padding: 1px 6px; border-radius: 6px; }
.linecard .skip { color: var(--sub); font-size: 13px; }

.slide.state { justify-content: center; align-items: center; text-align: center; color: var(--sub); gap: 12px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.retry { background: var(--accent); color: #fff; padding: 10px 22px; border-radius: 999px; font-weight: 800; }

/* 一覧 */
.grid, .my { height: 100%; overflow-y: auto; padding: calc(var(--topH) + 12px) 12px calc(24px + var(--safeB)); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
@media (max-width: 480px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.card { background: var(--panel); border-radius: 12px; overflow: hidden; text-align: left; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); }
.card .cimg { position: relative; aspect-ratio: 147 / 200; background: #000; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .cr { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 900; background: rgba(0,0,0,.7); padding: 2px 7px; border-radius: 999px; }
.card .cr.top3 { background: var(--gold); color: #1b1200; }
.card .ct { font-size: 12.5px; line-height: 1.4; padding: 0 9px; margin: 8px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .cm { font-size: 11.5px; color: var(--sub); padding: 0 9px 9px; }
.more { display: grid; place-items: center; padding: 22px 0; color: var(--sub); font-size: 13px; }
.credit { margin-top: 26px; padding: 18px 4px 6px; border-top: 1px solid var(--line); font-size: 12px; color: #8a8a99; line-height: 1.9; text-align: center; }
.credit a { color: #b9b9c6; }

/* マイページ */
.my h1 { font-size: 20px; margin: 4px 0 12px; }
.mytabs { display: flex; gap: 6px; margin-bottom: 12px; }
.mytabs button { padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--sub); }
.mytabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.myhint { color: var(--sub); font-size: 13px; margin: 0 0 12px; }

/* 検索 */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.6); display: flex; align-items: flex-start; justify-content: center; padding: calc(var(--topH) + 10px) 12px 0; }
.searchbox { width: 100%; max-width: 560px; display: flex; gap: 8px; background: var(--panel); padding: 10px; border-radius: 14px; border: 1px solid var(--line); flex-wrap: wrap; }
.searchbox input { flex: 1 1 200px; min-width: 0; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 0 12px; font-size: 16px; }
.searchbox button { height: 44px; padding: 0 16px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 800; }
.searchbox .ghost { background: var(--panel2); color: var(--text); }

/* 画像の拡大 */
.lightbox { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px 14px calc(20px + var(--safeB)); }
.lbwrap { position: relative; width: 100%; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 100%; max-height: 66vh; border-radius: 10px; }
.lbnav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; font-size: 40px; line-height: 1; color: #fff; background: rgba(0,0,0,.45); border-radius: 10px; }
#lbPrev { left: 0; } #lbNext { right: 0; }
.lbcount { color: var(--sub); font-size: 13px; font-weight: 700; }
.lightbox .buy { width: 100%; max-width: 420px; }
.lbclose { position: absolute; top: 10px; right: 12px; width: 44px; height: 44px; font-size: 28px; }

/* お知らせはボタンに重ならないよう上に出し、指の操作も素通りさせる */
.toast { position: fixed; left: 50%; top: calc(var(--topH) + 12px); transform: translateX(-50%); z-index: 50; pointer-events: none; background: rgba(30,30,40,.95); border: 1px solid var(--line); padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }

/* 年齢確認 */
.gate { position: fixed; inset: 0; z-index: 100; background: radial-gradient(90% 60% at 50% 30%, rgba(255,46,99,.22), transparent 70%), #07070a; display: grid; place-items: center; padding: 16px; }
.gatebox { width: 100%; max-width: 380px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px 20px 22px; }
.gatelogo { font-size: 24px; font-weight: 900; margin-bottom: 14px; }
.gatelogo span { color: var(--accent); }
.gatelead { font-weight: 800; margin: 0 0 8px; }
.gatetext { color: var(--sub); line-height: 1.7; margin: 0 0 18px; font-size: 14px; }
.gateyes { width: 100%; height: 52px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; font-weight: 900; font-size: 16px; }
.gateno { display: block; margin-top: 12px; color: var(--sub); font-size: 14px; padding: 8px; }
.gatenote { margin: 12px 0 0; font-size: 11px; color: #7c7c8c; }
