/* Caption templates + overlay layout for feed/reels (must match editor looks) */
.rf-ce-overlay-playback{
  position:absolute;inset:0;z-index:8;pointer-events:none;overflow:hidden
}
.rf-feed-reels-media-wrap .rf-ce-overlay-playback,
.rf-reels-media-wrap .rf-ce-overlay-playback{
  z-index:5;pointer-events:none;overflow:hidden
}
.rf-ce-overlay-playback .rf-ce-layer{
  position:absolute;pointer-events:none;cursor:default;max-width:88%;text-align:center;
  font-family:var(--rf-font);font-weight:900;line-height:1.22;
  text-shadow:0 2px 12px rgba(0,0,0,.65);
  padding:6px 10px;border-radius:8px;word-break:normal;overflow-wrap:break-word;
  transform-origin:center center;z-index:1;box-sizing:border-box
}
.rf-ce-overlay-playback .rf-ce-layer.is-text-formatted{letter-spacing:.02em}
.rf-ce-overlay-playback .rf-ce-layer.is-text-formatted:not(.is-single-line){
  white-space:pre-wrap;word-break:normal;overflow-wrap:break-word
}
.rf-ce-overlay-playback .rf-ce-layer.is-offstage{visibility:hidden!important}
.rf-ce-overlay-playback .rf-ce-layer.is-single-line{white-space:nowrap;word-break:normal}
.rf-ce-overlay-playback .rf-ce-layer.style-neon{
  color:#fff;text-shadow:0 0 8px var(--rf-neon-glow2,#ff2ea6),0 0 18px var(--rf-neon-glow,#ff174d),0 0 32px var(--rf-neon-glow,#ff174d)
}
.rf-ce-overlay-playback .rf-ce-layer.style-halo{
  color:#fff;text-shadow:0 0 12px rgba(255,255,255,.9),0 0 24px rgba(255,23,77,.5)
}
.rf-ce-overlay-playback .rf-ce-layer.style-block{background:rgba(0,0,0,.55);color:#fff}

.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-classic.style-block{
  background:rgba(0,0,0,.82)!important;border-radius:12px;padding:9px 16px;
  box-shadow:0 10px 28px rgba(0,0,0,.45);font-weight:800;letter-spacing:.01em;line-height:1.2
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-clean{
  background:transparent!important;font-weight:800;
  text-shadow:0 1px 0 rgba(0,0,0,.55),0 2px 10px rgba(0,0,0,.75),0 0 18px rgba(0,0,0,.35)
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-minimal{
  background:transparent!important;font-weight:900;
  -webkit-text-stroke:2px rgba(0,0,0,.92);paint-order:stroke fill;
  text-shadow:0 3px 12px rgba(0,0,0,.55)
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-solo{
  background:transparent!important;font-weight:900;letter-spacing:.02em;
  text-shadow:0 2px 0 rgba(0,0,0,.65),0 8px 24px rgba(0,0,0,.55)
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-solo.cap-reveal-solo .cap-word.is-visible{
  -webkit-text-stroke:1.5px rgba(0,0,0,.7);paint-order:stroke fill
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-karaoke{
  background:transparent!important;font-weight:800;text-shadow:0 2px 10px rgba(0,0,0,.7)
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-cinema.style-block{
  background:rgba(8,8,10,.88)!important;border-radius:2px;padding:8px 18px;
  border-left:3px solid #ff174d;font-weight:600;letter-spacing:.06em;
  box-shadow:0 12px 28px rgba(0,0,0,.4)
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-punch.style-block{
  background:rgba(0,0,0,.78)!important;border-radius:14px;padding:10px 18px;
  box-shadow:0 0 0 2px rgba(253,224,71,.55),0 12px 28px rgba(0,0,0,.45);font-weight:900
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-bounce{
  background:transparent!important;font-weight:900;
  text-shadow:0 0 1px #000,0 3px 0 rgba(0,0,0,.55),0 10px 24px rgba(255,23,77,.28)
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-neon.style-neon,
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-neon{
  background:transparent!important;font-weight:900;letter-spacing:.03em;
  text-shadow:0 0 8px var(--rf-neon-glow,#22d3ee),0 0 18px var(--rf-neon-glow,#22d3ee),0 0 34px rgba(34,211,238,.45),0 2px 8px rgba(0,0,0,.55)
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-viral.style-block{
  background:rgba(255,23,77,.9)!important;border-radius:999px;padding:9px 18px;
  box-shadow:0 10px 28px rgba(255,23,77,.35);font-weight:900;letter-spacing:.02em
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-gold{
  background:transparent!important;font-weight:900;
  text-shadow:0 1px 0 #92400e,0 2px 0 rgba(0,0,0,.55),0 8px 20px rgba(0,0,0,.55),0 0 18px rgba(251,191,36,.35)
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-glitch{
  background:transparent!important;font-weight:900;letter-spacing:.04em;
  text-shadow:2px 0 rgba(255,23,77,.85),-2px 0 rgba(34,211,238,.85),0 3px 12px rgba(0,0,0,.55)
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-magazine{
  background:transparent!important;text-transform:uppercase;letter-spacing:.16em;font-weight:800!important;
  text-shadow:0 2px 12px rgba(0,0,0,.65)
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-comic.style-block{
  background:#fff!important;border:2.5px solid #111827;border-radius:16px 16px 16px 6px;
  padding:9px 15px;box-shadow:3px 3px 0 #111827;font-weight:800
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-rainbow{
  background:transparent!important;font-weight:800;text-shadow:0 2px 12px rgba(0,0,0,.7)
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-impact{
  background:transparent!important;font-weight:900!important;
  -webkit-text-stroke:2.5px #111827;paint-order:stroke fill;
  text-shadow:0 4px 0 #111827,0 10px 22px rgba(0,0,0,.45)
}

.rf-ce-overlay-playback .rf-ce-layer.is-cap-word-reveal{
  text-align:center;line-height:1.28;letter-spacing:.01em
}
.rf-ce-overlay-playback .rf-ce-layer.is-cap-word-reveal .cap-word{
  display:inline-block;opacity:0;transform:translateY(10px) scale(.82);
  margin:0 .1em;vertical-align:baseline;will-change:transform,opacity;pointer-events:none
}
.rf-ce-overlay-playback .rf-ce-layer.is-cap-word-reveal .cap-word.is-visible{
  opacity:1;transform:none
}
.rf-ce-overlay-playback .rf-ce-layer.is-cap-karaoke .cap-word{
  opacity:.42;transition:opacity .1s ease,transform .12s cubic-bezier(.2,.9,.3,1.15),color .1s ease,text-shadow .12s ease;
  color:inherit!important
}
.rf-ce-overlay-playback .rf-ce-layer.is-cap-karaoke .cap-word.is-visible{opacity:.78}
.rf-ce-overlay-playback .rf-ce-layer.is-cap-karaoke .cap-word.is-active{
  opacity:1;color:var(--cap-accent,#facc15)!important;transform:scale(1.08);
  text-shadow:0 0 14px var(--cap-accent,#facc15),0 2px 8px rgba(0,0,0,.45)
}
.rf-ce-overlay-playback .rf-ce-layer.is-cap-karaoke .cap-word.is-spoken{
  opacity:.78;color:inherit!important;transform:none;text-shadow:inherit
}
.rf-ce-overlay-playback .rf-ce-layer.cap-tpl-rainbow.is-cap-karaoke .cap-word.is-active{
  color:#fff!important;
  text-shadow:0 0 10px #ff2ea6,0 0 18px #60a5fa,0 2px 8px rgba(0,0,0,.5)
}
