/* Custom captions fit the video frame for free and member players alike. */
#videoModalOverlay #videoModalInner .tonflix-caption-display{
 left:3%;right:3%;width:auto;max-width:94%;margin:0 auto;
 font-size:var(--tonflix-caption-font,18px)!important;line-height:1.18!important;
 white-space:normal!important;overflow-wrap:normal;word-break:normal;
 bottom:var(--tonflix-caption-bottom,12px)!important;
 font-weight:500!important;-webkit-text-stroke:0!important;
 text-shadow:0 1px 3px #000,0 0 5px #000,0 2px 8px rgba(0,0,0,.9)!important;
}
@media(max-width:720px){#videoModalOverlay #videoModalInner .tonflix-caption-display{font-size:var(--tonflix-caption-font,13px)!important;}}

/* Larger desktop captions; compact/mobile player sizing remains video-relative. */
@media(min-width:721px) and (pointer:fine){
 #videoModalOverlay #videoModalInner .tonflix-caption-display{font-weight:600!important;}
 #videoModalInner video::cue{font-size:clamp(24px,2.5vw,48px);font-weight:600;}
}
/* TV native cues are painted by the browser, independently of the custom layer. */
body.tonflix-tv-mode #videoModalInner video::cue{
 font-family:Arial,Helvetica,sans-serif;font-size:clamp(32px,3.2vw,60px);font-weight:600;
}

/* A soft black glow/shadow keeps native captions readable without a box or stroke. */
#videoModalInner video::cue{
 color:#fff;background:transparent;line-height:1.2;
 text-shadow:0 1px 3px #000,0 0 5px #000,0 2px 8px rgba(0,0,0,.9);
}

body.tonflix-tv-mode #videoModalOverlay #videoModalInner .tonflix-caption-display{font-weight:600!important;}
