.fetish-item-fx {
  position: absolute;
  inset: 0;
  z-index: 12;
  overflow: hidden;
  border-radius: 8px;
  pointer-events: none;
  user-select: none;
  --fabric-opacity: .54;
}

.fetish-item-fx[hidden] { display: none; }

.fetish-item-fx[data-item="stockings"] { --fabric-opacity: .43; }
.fetish-item-fx[data-item="panties"] { --fabric-opacity: .61; }
.fetish-item-fx[data-item="panties"] .fetish-item-fx-curtain { transform-origin: 50% 0; }
.fetish-item-fx[data-item="bra"] { --fabric-opacity: .50; }

.hostess-stage:has(> .fetish-item-fx:not([hidden])) .portrait-losing-pressure-bubbles {
  visibility: hidden;
}

.fetish-item-inner-voice .losing-pressure-sigil {
  --voice-left: 29%;
  --voice-top: 31%;
}

.fetish-item-inner-voice .losing-pressure-sigil:nth-child(2) {
  --voice-left: 72%;
  --voice-top: 46%;
  --voice-tilt: 4deg;
}

.fetish-item-inner-voice .losing-pressure-sigil:empty { display: none; }
.fetish-item-inner-voice:lang(zh) .losing-pressure-sigil {
  max-height: none;
  white-space: nowrap;
}

.fetish-item-inner-voice:lang(en) .losing-pressure-sigil { max-width: min(10em, 38%); }

@media (prefers-reduced-motion: reduce) {
  .fetish-item-inner-voice .losing-pressure-sigil { animation-name: none; }
}

.fetish-item-fx-curtain,
.fetish-item-fx-atmosphere {
  position: absolute;
  inset: -2%;
}

.fetish-item-fx-mask {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: var(--fabric-opacity);
  transform-origin: 52% 46%;
}

.fetish-item-fx-atmosphere {
  background:
    radial-gradient(ellipse at 52% 43%, rgb(195 50 111 / .05) 22%, rgb(141 27 90 / .17) 70%, rgb(40 10 30 / .47) 100%),
    linear-gradient(170deg, rgb(241 113 172 / .13), transparent 28% 63%, rgb(208 63 128 / .13));
}

.fetish-item-fx-atmosphere::before,
.fetish-item-fx-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
}

.fetish-item-fx-atmosphere::before {
  background:
    radial-gradient(ellipse at 19% 71%, rgb(248 168 199 / .62), transparent 52%),
    radial-gradient(ellipse at 73% 92%, rgb(233 122 178 / .73), transparent 58%);
  mask: url("../generated-assets/steam.png") center bottom / cover no-repeat;
  opacity: .64;
}

.fetish-item-fx-atmosphere::after {
  background: radial-gradient(ellipse at 50% 45%, transparent 30%, rgb(255 121 171 / .20) 73%, rgb(127 20 74 / .32) 100%);
  opacity: .18;
}

.fetish-item-fx[data-item="bra"][data-bra-slip] .fetish-item-fx-atmosphere::after {
  background: radial-gradient(ellipse at 50% 49%, transparent 14%, rgb(255 99 169 / .63) 58%, rgb(141 17 79 / .76) 100%);
  opacity: .34;
}

.fetish-item-fx-panties-mist {
  display: none;
  position: absolute;
  inset: -12%;
  overflow: hidden;
  transform-origin: 50% 44%;
}

.fetish-item-fx[data-item="panties"] .fetish-item-fx-panties-mist {
  display: block;
}

.fetish-item-fx-panties-cloud {
  position: absolute;
  width: 112%;
  height: 72%;
  background: url("../generated-assets/steam.png") center / contain no-repeat;
  opacity: .57;
}

.fetish-item-fx-panties-cloud:nth-child(1) {
  left: -35%;
  bottom: -13%;
  transform: rotate(-8deg) scale(1.28);
}

.fetish-item-fx-panties-cloud:nth-child(2) {
  right: -42%;
  bottom: 8%;
  opacity: .49;
  transform: rotate(13deg) scale(1.46);
}

.fetish-item-fx-panties-cloud:nth-child(3) {
  left: -7%;
  top: -18%;
  opacity: .36;
  transform: rotate(174deg) scale(1.16);
}

.fetish-item-fx[data-item="panties"] .fetish-item-fx-atmosphere {
  background:
    radial-gradient(ellipse at 50% 48%, rgb(255 163 201 / .22) 0 22%, rgb(207 64 132 / .24) 57%, rgb(78 13 52 / .58) 100%),
    linear-gradient(168deg, rgb(255 129 185 / .22), transparent 30% 58%, rgb(232 75 148 / .23));
}

.fetish-item-fx[data-item="panties"] .fetish-item-fx-atmosphere::before {
  background:
    radial-gradient(ellipse at 17% 78%, rgb(255 192 217 / .86), transparent 53%),
    radial-gradient(ellipse at 77% 87%, rgb(247 151 197 / .88), transparent 57%),
    radial-gradient(ellipse at 52% 38%, rgb(239 125 181 / .45), transparent 63%);
  opacity: .88;
}

.fetish-item-fx[data-item="panties"] .fetish-item-fx-atmosphere::after {
  background: radial-gradient(ellipse at 50% 45%, transparent 18%, rgb(255 117 175 / .34) 61%, rgb(104 13 63 / .54) 100%);
  opacity: .30;
}


.fetish-item-fx-mask { transform: scale(calc(1 + var(--fx-heart, 0) * .012)); }
.fetish-item-fx-atmosphere::before { transform: translate3d(calc(var(--fx-sway, 0) * 2%), calc(var(--fx-breath, .5) * -4%), 0); opacity: calc(.54 + var(--fx-breath, .5) * .12); }
.fetish-item-inner-voice > span {
  animation-name: none;
  opacity: calc(.45 + var(--fx-breath, .5) * .4);
  transform: translate3d(calc(var(--fx-sway, 0) * 5px), calc(var(--fx-breath, .5) * -16px), 0) rotate(var(--voice-tilt, -3deg));
}
.fetish-item-fx-panties-cloud { transform: translate3d(calc(var(--fx-sway, 0) * 3%), calc(var(--fx-breath, .5) * -6%), 0) scale(1.3); }
.fetish-item-fx[data-bra-slip] .fetish-item-fx-atmosphere::after { animation: fetish-bra-slip-tint var(--bra-slip-duration) ease-out both; }
@keyframes fetish-bra-slip-tint { 0%,100% {opacity:.18} 15%,45% {opacity:.7} }
@media (prefers-reduced-motion: reduce) {
  .fetish-item-fx *, .fetish-item-fx *::before, .fetish-item-fx *::after { animation: none !important; transform: none !important; }
  .fetish-item-inner-voice > span { opacity: .8; }
}

/* Soften the traveling edge only; held and instant states have no mask. */
.fetish-item-fx[data-item="panties"]:is([data-phase="wrapping"], [data-phase="removing"]) .fetish-item-fx-curtain {
  -webkit-mask-image: linear-gradient(#000 0 85%, transparent 100%);
  mask-image: linear-gradient(#000 0 85%, transparent 100%);
  -webkit-mask-size: 100% 118%;
  mask-size: 100% 118%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}

.fetish-item-fx-full { position:absolute; display:none; max-width:none; opacity:var(--fabric-opacity); transform-origin:center; }
.fetish-item-fx[data-item="panties"]:is([data-phase="wrapping"],[data-phase="removing"]) .fetish-item-fx-full { display:block; }

.fetish-item-fx[data-item="panties"][data-phase="wrapping"] .fetish-item-fx-mask { animation:pantiesPortraitCropIn 1000ms linear both; }
.fetish-item-fx[data-item="panties"][data-phase="removing"] .fetish-item-fx-mask { animation:pantiesPortraitCropOut 560ms linear both; }
.fetish-item-fx[data-item="panties"][data-phase="wrapping"] .fetish-item-fx-full { animation:pantiesPortraitFullIn 1000ms linear both; }
.fetish-item-fx[data-item="panties"][data-phase="removing"] .fetish-item-fx-full { animation:pantiesPortraitFullOut 560ms linear both; }

.fetish-item-fx[data-item="panties"]:is([data-phase="wrapping"],[data-phase="removing"]) .fetish-item-fx-curtain { opacity:var(--fabric-opacity); }
.fetish-item-fx[data-item="panties"]:is([data-phase="wrapping"],[data-phase="removing"]) .fetish-item-fx-mask { opacity:1; }
@keyframes pantiesPortraitCropIn { 0%,95.999% { visibility:hidden; } 96%,100% { visibility:visible; } }
@keyframes pantiesPortraitCropOut { 0%,7.142857% { visibility:visible; } 7.143%,100% { visibility:hidden; } }
@keyframes pantiesPortraitFullIn { 0%,96% { opacity:1; } 100% { opacity:0; } }
@keyframes pantiesPortraitFullOut { 0% { opacity:0; } 7.142857%,100% { opacity:1; } }
