.fv-character-cycle {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #fff;
  /* isolationは付けない: frontキャンバス(右下の幾何)を
     モジュール外の人物切り抜き(.fv-pop z6)より手前(z7)に
     出すため、z-indexを外側のスタッキングコンテキストと
     相互に重ねられる必要がある(2026-08-26) */
}

.fv-character-cycle__scene {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.fv-character-cycle__scene-image,
.fv-character-cycle__card-face img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fv-character-cycle__fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* swipe/layers用: 現在の写真を一段引かせる白ワッシュ */
.fv-character-cycle__wash {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

/* swipe/layers用: 次の人物の入場レイヤー */
.fv-character-cycle__incoming {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  overflow: hidden;
  pointer-events: none;
}
.fv-character-cycle__incoming img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
}

/* 幾何Canvasはカードレイヤーより手前に置く。
   幾何の退場とカード化(回転)が並行するため、カードの白背景に
   隠されると退場が「フッと消える」見え方に戻ってしまう。
   人物との前後関係はz-indexではなくmask合成で表現しているので、
   通常表示時の見え方はこの変更の影響を受けない */
.fv-character-cycle__fx--back { z-index: 5; }   /* 人物切り抜き(.fv-pop z6)の後ろ */
.fv-character-cycle__fx--front { z-index: 7; }  /* 右下の幾何: 人物より手前(最前面メイン) */
.fv-character-cycle__fx--hearts { z-index: 10; } /* ハートは全レイヤーの最前面(コピー帯z9より上) */

/* ジャンルタグのスタンプ(切替のたびにバンッと入る) */
.fv-character-cycle__stamp {
  position: absolute;
  top: 19%;
  right: 14px;
  z-index: 9;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff49a3, #a159ff);
  color: #fff;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: .02em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  pointer-events: none;
  opacity: 0;
  transform: scale(.9) rotate(-6deg);
  transition: opacity .2s ease, transform .25s ease;
}
.fv-character-cycle__stamp.is-on {
  opacity: 1;
  animation: fv-stamp-in .42s cubic-bezier(.2, 1.4, .4, 1) both;
}
/* 出方は控えめに(1.9→1.35、ひねりも浅く。2026-08-26FB) */
@keyframes fv-stamp-in {
  from { transform: scale(1.35) rotate(2deg); opacity: 0; }
  60%  { transform: scale(.97) rotate(-6.5deg); opacity: 1; }
  to   { transform: scale(1) rotate(-6deg); opacity: 1; }
}

.fv-character-cycle__card-wrap {
  position: absolute;
  inset: 0;
  z-index: 4;
  perspective: 1600px;
  pointer-events: none;
  opacity: 0;
  background: #fff;
}

.fv-character-cycle__card {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform, left, top, right, bottom, border-radius;
}

.fv-character-cycle__card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: inherit;
  box-shadow: 0 16px 38px rgba(0,0,0,.18);
}

.fv-character-cycle__card-face--back {
  transform: rotateY(180deg);
}

/* 3D回転中のレイヤー再ラスタライズによるちらつき防止:
   面の画像を最初から独立レイヤーに載せておく */
.fv-character-cycle__card-face img {
  transform: translateZ(0);
}

@media (prefers-reduced-motion: reduce) {
  .fv-character-cycle__card,
  .fv-character-cycle__fx {
    transition: none !important;
    animation: none !important;
  }
}