/* 縦スワイプ画面。色・ボタン・年齢確認は site.css と共通 */
body.swipe-page { height: 100%; overflow: hidden; padding: 0 !important; }

.app { position: fixed; inset: 0; display: flex; justify-content: center; overflow: hidden; background: #000; }
.feed {
  position: relative; width: 100%; max-width: 520px; height: 100%;
  overflow-y: scroll; scroll-snap-type: y mandatory; overscroll-behavior: contain;
  scrollbar-width: none; background: #000;
}
.feed::-webkit-scrollbar { display: none; }

/* ---------- 上部：ホーム / ランキング・新着 / ジャンル ---------- */
.top {
  position: absolute; z-index: 5; top: 0; left: 0; right: 0; max-width: 520px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 6px) max(12px, env(safe-area-inset-right, 0px)) 14px max(12px, env(safe-area-inset-left, 0px));
  display: grid; grid-template-columns: 40px 1fr 40px; align-items: center;
  background: linear-gradient(rgba(0, 0, 0, .55), transparent);
}
.top-home, .top-genre {
  display: grid; place-items: center; width: 40px; height: 40px; color: #fff; background: none; border: 0; cursor: pointer;
}
.top-home .ic, .top-genre .ic { width: 24px; height: 24px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.tabs { display: flex; justify-content: center; gap: 22px; }
.tab {
  text-decoration: none; color: rgba(255, 255, 255, .65); font: 700 16px var(--font); padding: 8px 0 6px; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.tab:hover { color: #fff; }
.tab[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 #fff; }

.filter {
  position: absolute; z-index: 5; left: 50%; transform: translateX(-50%);
  top: calc(env(safe-area-inset-top, 0px) + 60px);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  background: rgba(255, 255, 255, .16); backdrop-filter: blur(10px);
  font-weight: 700; font-size: 13px; padding: 5px 6px 5px 14px; border-radius: 999px;
}
.filter a { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.25); text-decoration: none; font-size: 11px; }

.new-btn {
  position: absolute; z-index: 6; left: 50%; transform: translateX(-50%);
  top: calc(env(safe-area-inset-top, 0px) + 62px);
  border: 0; cursor: pointer; white-space: nowrap;
  background: var(--accent); color: #fff; font: 700 13px var(--font);
  padding: 8px 16px; border-radius: 999px; box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
  animation: drop .35s ease;
}
.new-btn::before { content: "↑ "; }
.filter ~ .new-btn { top: calc(env(safe-area-inset-top, 0px) + 100px); }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -8px); } }
.slide.fresh .who-names::after {
  content: "NEW"; margin-left: 8px; font-size: 10px; font-weight: 900; letter-spacing: .04em;
  background: var(--accent); padding: 2px 5px; border-radius: 3px; vertical-align: 2px;
}

/* ---------- 1枚 ---------- */
.slide {
  position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden;
  display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 56px) 0 calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: #000;
}
.bg { position: absolute; inset: -40px; background: center / cover no-repeat #000; filter: blur(30px) brightness(.35); z-index: 0; }
.slide > *:not(.bg):not(.hint) { position: relative; z-index: 1; }

/* 動画は横長なので、残りの高さの真ん中に置く */
.stage { flex: 1; min-height: 0; display: grid; align-items: center; }
.player { position: relative; width: 100%; overflow: hidden; background: #000; }
.player .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.player iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; }
.player .tap {
  position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .2);
  border: 0; color: #fff; cursor: pointer; font: 700 13px var(--font); text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.player .tap span { display: grid; gap: 8px; justify-items: center; }
.player .tap svg { width: 60px; height: 60px; }
.player .tap svg circle { fill: rgba(0, 0, 0, .5); }
.player .tap svg path { fill: #fff; }
.player .placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-soft); font-size: 13px; text-align: center; padding: 0 16px;
  background: var(--surface);
}

/* 下：説明（左）とボタン列（右） */
.bottom {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px;
  padding: 12px max(12px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
}
.caption { display: grid; gap: 6px; min-width: 0; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.who { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 16px; min-width: 0; }
.who .avatar { width: 34px; height: 34px; font-size: 15px; text-shadow: none; }
.who-names { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who a { text-decoration: none; }
.who a:hover { text-decoration: underline; }
.who .sep { color: var(--ink-soft); font-weight: 500; }
.title { margin: 0; font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 0 8px; }
.tag { text-decoration: none; font-weight: 700; font-size: 14px; }
.tag:hover { text-decoration: underline; }
.facts { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; color: rgba(255,255,255,.75); }
.facts .stars { font-size: 12px; }

.rail { display: grid; gap: 14px; justify-items: center; }
.rbtn {
  display: grid; justify-items: center; gap: 4px; background: none; border: 0; padding: 0; cursor: pointer;
  color: #fff; text-decoration: none; font: 700 11px var(--font); text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.rbtn .round { width: 46px; height: 46px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(8px); }
.rbtn .round svg { width: 22px; height: 22px; }
.rbtn:hover .round { background: rgba(255, 255, 255, .26); }

/* 商品バー（購入リンク） */
.product {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  margin: 0 max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px));
  padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .12); backdrop-filter: blur(10px);
}
.product:hover { background: rgba(255, 255, 255, .18); }
.product-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: var(--accent); color: #fff; flex: none; }
.product-ic svg { width: 20px; height: 20px; }
.product-text { display: grid; min-width: 0; flex: 1; line-height: 1.35; }
.product-text span { font-size: 11px; color: rgba(255,255,255,.7); }
.product-text b { font-size: 15px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-go { flex: none; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; padding: 8px 12px; border-radius: 7px; }

.hint {
  position: absolute; z-index: 2; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 66px); white-space: nowrap;
  background: rgba(0, 0, 0, .6); padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 700;
  animation: nudge 1.6s ease-in-out infinite; pointer-events: none; transition: opacity .3s;
}
.hint::before { content: "↑ "; }
.hint.gone { opacity: 0; }
@keyframes nudge { 50% { margin-top: 6px; } }
.filter ~ .feed .hint { top: calc(env(safe-area-inset-top, 0px) + 102px); }

.end {
  height: 100%; scroll-snap-align: start; display: grid; place-content: center; gap: 12px; text-align: center;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); background: #000;
}
.end h2 { margin: 0; font-size: 20px; font-weight: 900; }
.end p { margin: 0; color: var(--ink-soft); line-height: 1.6; }

/* ---------- 下から出るシート ---------- */
.scrim { position: absolute; inset: 0; z-index: 20; background: rgba(0, 0, 0, .55); }
.sheet {
  position: absolute; z-index: 21; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto;
  max-height: 80%; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 14px 14px 0 0;
  animation: rise .25s ease;
}
.sheet::before { content: ""; width: 36px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); margin: 8px auto 0; flex: none; }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 { margin: 0; font-size: 15px; font-weight: 700; flex: 1; text-align: center; padding-left: 32px; }
.sheet-close { border: 0; background: var(--surface-2); color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 12px; }
.sheet-body {
  overflow-y: auto; display: grid; gap: 14px;
  padding: 14px max(16px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 22px) max(16px, env(safe-area-inset-left, 0px));
}
.detail-title { margin: 0; font-weight: 700; line-height: 1.6; }
.sheet .detail .row { grid-template-columns: 6em minmax(0, 1fr); padding: 10px 0; }
.sheet .detail dd { font-size: 13px; }
.sheet .detail dd .tag { display: inline-block; margin: 0 8px 4px 0; font-size: 13px; }
.sheet .cta { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; }
.sheet .cta-note { margin: -6px 0 0; text-align: center; font-size: 11px; color: var(--ink-soft); }
.genre-list { display: flex; flex-wrap: wrap; gap: 8px; }
.genre-list .tag { background: var(--surface-2); padding: 7px 14px; border-radius: 999px; font-size: 14px; }
.sheet-link { color: #fff; font-weight: 700; text-decoration: none; text-align: center; padding: 10px; border-radius: 8px; background: var(--surface-2); }
.sheet-link:hover { background: #2c2c2c; }

@media (prefers-reduced-motion: reduce) { .hint, .sheet, .new-btn { animation: none; } }

/* セール中の購入バー */
.product-text .sale-line { gap: 6px; }
.product-text .sale-line > span:last-child { font-size: 10px; color: rgba(255,255,255,.6); }
.product-text .sale-badge { font-size: 10px; padding: 1px 5px; color: #111; }
.product-text .sale-end { font-size: 10px; color: var(--sale); }
.tabs { gap: 18px; }
