/* Shared video player (see player.js) */
.vinner{position:absolute;inset:0;overflow:hidden;border-radius:inherit;background:#000}
/* The YouTube player is taller than its frame, so its title bar and edges sit outside the frame and are never seen */
.vinner iframe{position:absolute;left:0;width:100%;top:-80px;height:calc(100% + 160px);border:0;pointer-events:none}
.vinner video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.vposter{position:absolute;inset:0;z-index:1;background:#000 center/cover no-repeat;transition:opacity .5s cubic-bezier(.4,0,.2,1)}
.revealed.is-playing .vposter{opacity:0;pointer-events:none}
.vshield{position:absolute;inset:0;z-index:2;width:100%;height:100%;border:0;padding:0;margin:0;background:transparent;cursor:pointer;-webkit-tap-highlight-color:transparent}
.vshield::after{content:"";position:absolute;left:50%;top:50%;width:52px;height:52px;margin:-26px 0 0 -26px;border-radius:50%;border:1px solid rgba(243,233,212,.7);background:rgba(20,27,32,.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='%23f3e9d4'/%3E%3C/svg%3E") center/22px no-repeat;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);transition:opacity .3s,transform .25s}
.vshield:hover::after{transform:scale(1.08)}
.is-playing .vshield::after{opacity:0}
.vinner .sound{z-index:3}
/* Phones: the playing video floats large over the page */
/* Solid dark backdrop: nothing of the page shows through. The close mark on the video (or any tap outside it) shrinks it back */
.vback{position:fixed;inset:0;z-index:90;background:#0b0907;opacity:0;transition:opacity .3s;cursor:pointer}

.vback.on{opacity:1}
.floating{transform:none!important;will-change:auto!important;z-index:91}
.floating .vinner{position:fixed;inset:auto;left:50%;top:50%;width:var(--fw);height:calc(var(--fw) / var(--ar));transform:translate(-50%,-50%);z-index:91;border-radius:18px;box-shadow:0 30px 80px rgba(0,0,0,.6)}
/* Shorts: YouTube keeps a like count in the corner of vertical videos, so these are zoomed 30% inside their frame to push that corner out of view */
.short .vinner iframe{left:-15%;width:130%;top:calc(-15% - 80px);height:calc(130% + 160px)}
.vposter.flip{transform:scaleX(-1)}
/* Shorts: a short crossfade from the preview picture into the video */
.short .vposter{transition-duration:.6s}
/* Playback line: a fine line at the bottom of each video, shown once it plays; tap or drag to move through the video */
.vbar{position:absolute;left:0;right:0;bottom:0;height:20px;z-index:3;cursor:pointer;touch-action:none;opacity:0;pointer-events:none;transition:opacity .3s}
.revealed .vbar{opacity:1;pointer-events:auto}
.vbar::before,.vbar i{content:"";position:absolute;left:14px;bottom:9px;height:2px;border-radius:2px}
.vbar::before{right:14px;background:rgba(243,233,212,.3)}
.vbar i{width:calc((100% - 28px) * var(--p,0));background:#f3e9d4}
.vbar i::after{content:"";position:absolute;right:-5px;top:-4px;width:10px;height:10px;border-radius:50%;background:#f3e9d4;transform:scale(0);transition:transform .2s}
.vbar:hover i::after,.vbar.drag i::after{transform:scale(1)}
@media (hover:none){.vbar i::after{transform:scale(.8)}}
/* Close mark: top left of a floating video */
.vclose{display:none;position:absolute;top:10px;left:10px;z-index:4;width:30px;height:30px;padding:0;border-radius:50%;border:1px solid rgba(243,233,212,.5);background:rgba(12,10,8,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7l10 10M17 7L7 17' stroke='%23f3e9d4' stroke-width='1.6' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center/16px no-repeat;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);cursor:pointer}
.floating .vclose{display:block}
/* While a video floats, the whole page is hidden: only the dark background and the video show, nothing peeks through */
html.vfloat body *{visibility:hidden}
html.vfloat .vback,html.vfloat .floating *{visibility:visible}
/* The empty frame the video came from stays hidden too (its border and black fill) */
html.vfloat .floating{visibility:hidden;border-color:transparent;background:transparent}
html.vfloat .floating .vposter{visibility:hidden}
html.vfloat .revealed.is-playing .vposter{visibility:hidden}
html.vfloat .floating .vinner:not(.revealed) .vposter{visibility:visible}
