
.mgfv-overlay{position:fixed;inset:0;z-index:999999;background:transparent;overflow:visible;font-family:Arial,sans-serif;pointer-events:none}
.mgfv-card{position:fixed;left:0;bottom:0;width:50vw;height:50dvh;max-width:480px;max-height:420px;min-width:150px;min-height:120px;margin:0;display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box;background:#080808;border:1px solid rgba(255,255,255,.35);border-radius:0 12px 0 0;box-shadow:0 2px 18px rgba(0,0,0,.24);pointer-events:auto}
.mgfv-header{position:absolute;top:7px;right:7px;z-index:10;padding:0;margin:0;background:transparent;border:0;color:#fff;touch-action:manipulation;user-select:none;-webkit-user-select:none}
.mgfv-header-row{display:flex;align-items:center;justify-content:flex-end;gap:7px}
.mgfv-header-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.mgfv-expand,.mgfv-close{display:flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;border:1px solid rgba(255,255,255,.75);border-radius:50%;background:rgba(255,255,255,.94);color:#202833;font-size:21px;line-height:1;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.22)}
.mgfv-expand-icon{display:block;transform:translateY(-1px)}
.mgfv-close{font-size:23px}
.mgfv-video-wrap{position:relative;flex:1 1 auto;min-height:0;width:100%;height:100%;background:#080808;overflow:hidden;display:flex;align-items:center;justify-content:center}
.mgfv-video-wrap iframe,.mgfv-video-wrap video{display:block;width:100%;height:100%;max-width:100%;max-height:100%;border:0;object-fit:contain;background:#080808}
.mgfv-video-wrap blockquote{max-height:100%;overflow:auto}
.mgfv-fallback{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:12px;padding:16px;box-sizing:border-box;color:#fff;text-align:center;font-size:12px;line-height:1.5;background:#111}
.mgfv-fallback a{color:#fff;font-weight:700}
.mgfv-overlay.mgfv-is-fullscreen{background:#080808;pointer-events:auto}
.mgfv-overlay.mgfv-is-fullscreen .mgfv-card{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;min-width:0;min-height:0;border:0;border-radius:0;box-shadow:none}
.mgfv-overlay.mgfv-is-fullscreen .mgfv-header{top:calc(10px + env(safe-area-inset-top));right:12px}
.mgfv-overlay.mgfv-is-fullscreen .mgfv-video-wrap{flex:1 1 auto;min-height:0}
@media(max-width:480px){
 .mgfv-card{width:50vw;height:50dvh;max-width:none;max-height:none;min-width:140px;min-height:120px;border-radius:0 10px 0 0}
 .mgfv-header{top:6px;right:6px}
 .mgfv-expand,.mgfv-close{width:31px;height:31px;font-size:19px}
 .mgfv-close{font-size:22px}
}
@media(prefers-reduced-motion:reduce){.mgfv-card:before{animation:none}}

.mgfv-social-embed{width:100%;height:100%;min-height:0;overflow:auto;background:#fff;display:flex;align-items:flex-start;justify-content:center}
.mgfv-social-embed blockquote{box-sizing:border-box!important;max-width:100%!important;width:100%!important;margin:0 auto!important}
.mgfv-social-embed iframe{max-width:100%!important}
.mgfv-threads-embed{background:#fff}
.mgfv-x-embed{background:#fff}


/* Social post embeds: wider portrait card; embedded post stays intact and scrollable. */
.mgfv-overlay .mgfv-card.mgfv-card-social{
  left:12px;bottom:12px;width:min(90vw,440px);height:min(72dvh,620px);
  max-width:440px;max-height:620px;min-width:0;min-height:300px;
  aspect-ratio:4/5;border:1px solid rgba(210,216,225,.95);
  border-radius:18px;background:#fff;box-shadow:0 8px 28px rgba(0,0,0,.28);
}
.mgfv-card-social .mgfv-video-wrap{
  overflow:auto;align-items:flex-start;justify-content:center;background:#fff;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
}
.mgfv-card-social .mgfv-video-wrap iframe{
  display:block;flex:0 0 auto;width:100%;max-width:100%;height:100%;
  min-height:100%;border:0;object-fit:contain;background:#fff;
}
.mgfv-card-social .mgfv-social-embed{
  display:block;width:100%;height:auto;min-height:100%;overflow:visible;background:#fff;
}
.mgfv-card-social .mgfv-social-embed blockquote{
  width:100%!important;max-width:100%!important;max-height:none!important;
  height:auto!important;overflow:visible!important;margin:0 auto!important;
}
.mgfv-card-social .mgfv-social-embed iframe{
  width:100%!important;max-width:100%!important;height:auto;min-height:420px;
}
.mgfv-card-social .mgfv-header{top:8px;right:8px}
@media(max-width:480px){
 .mgfv-overlay .mgfv-card.mgfv-card-social{
  left:5vw;bottom:calc(8px + env(safe-area-inset-bottom));width:90vw;
  height:min(70dvh,620px);max-width:none;max-height:620px;min-height:280px;
  aspect-ratio:4/5;border-radius:16px;
 }
 .mgfv-card-social .mgfv-header{top:7px;right:7px}
}
.mgfv-overlay.mgfv-is-fullscreen .mgfv-card.mgfv-card-social{
 left:0;bottom:0;width:100vw;height:100dvh;max-width:none;max-height:none;
 min-height:0;aspect-ratio:auto;border:0;border-radius:0;
}


/* v1.1.4: landscape layout reserved for social/embed posts */
.mgfv-overlay .mgfv-card.mgfv-card-social{
  left:12px;
  bottom:12px;
  width:min(92vw,560px);
  height:auto;
  aspect-ratio:16/9;
  max-width:560px;
  max-height:none;
  min-width:0;
  min-height:0;
  border-radius:16px;
  overflow:hidden;
}
.mgfv-card-social .mgfv-video-wrap{
  width:100%;
  height:100%;
  min-height:0;
  overflow:auto;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
}
.mgfv-card-social .mgfv-video-wrap iframe{
  width:100%;
  height:100%;
  min-height:0;
  max-width:100%;
  object-fit:contain;
}
.mgfv-card-social .mgfv-social-embed{
  width:100%;
  height:100%;
  min-height:0;
  overflow:auto;
  display:flex;
  align-items:flex-start;
  justify-content:center;
}
.mgfv-card-social .mgfv-social-embed blockquote{
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  margin:0 auto!important;
}
.mgfv-card-social .mgfv-social-embed iframe{
  width:100%!important;
  max-width:100%!important;
  height:100%!important;
  min-height:0!important;
}
@media(max-width:600px){
  .mgfv-overlay .mgfv-card.mgfv-card-social{
    left:4vw;
    bottom:calc(10px + env(safe-area-inset-bottom));
    width:92vw;
    height:auto;
    aspect-ratio:16/9;
    max-width:none;
    max-height:none;
    min-height:0;
    border-radius:14px;
  }
}
.mgfv-overlay.mgfv-is-fullscreen .mgfv-card.mgfv-card-social{
  left:0;
  bottom:0;
  width:100vw;
  height:100dvh;
  max-width:none;
  max-height:none;
  aspect-ratio:auto;
  border-radius:0;
}


/* v1.1.5: compact typography for social embed markup only.
   Native uploaded videos and direct video URLs are intentionally untouched. */
.mgfv-card-social .mgfv-social-embed blockquote,
.mgfv-card-social .mgfv-social-embed blockquote p,
.mgfv-card-social .mgfv-social-embed blockquote a,
.mgfv-card-social .mgfv-social-embed blockquote span,
.mgfv-card-social .mgfv-social-embed blockquote div,
.mgfv-card-social .mgfv-social-embed blockquote strong,
.mgfv-card-social .mgfv-social-embed blockquote time{
  font-size:13px!important;
  line-height:1.35!important;
}
.mgfv-card-social .mgfv-social-embed blockquote p{
  margin-top:5px!important;
  margin-bottom:5px!important;
}
.mgfv-card-social .mgfv-social-embed blockquote img{
  max-width:100%!important;
}
@media(max-width:600px){
  .mgfv-card-social .mgfv-social-embed blockquote,
  .mgfv-card-social .mgfv-social-embed blockquote p,
  .mgfv-card-social .mgfv-social-embed blockquote a,
  .mgfv-card-social .mgfv-social-embed blockquote span,
  .mgfv-card-social .mgfv-social-embed blockquote div,
  .mgfv-card-social .mgfv-social-embed blockquote strong,
  .mgfv-card-social .mgfv-social-embed blockquote time{
    font-size:12px!important;
    line-height:1.32!important;
  }
}


/* v1.1.6: Threads/X post card keeps the landscape shell, while its full post
   (caption + media) can be read by vertical scrolling inside the card. */
.mgfv-card-social-post .mgfv-video-wrap{
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  display:flex;
  align-items:stretch;
  justify-content:flex-start;
  background:#fff;
}
.mgfv-card-social-post .mgfv-social-embed{
  display:block!important;
  flex:1 1 auto;
  width:100%;
  height:100%;
  min-height:0;
  max-height:100%;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-y:contain;
  touch-action:pan-y;
  scrollbar-width:thin;
  background:#fff;
}
.mgfv-card-social-post .mgfv-social-embed blockquote{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  margin:0 auto!important;
}
.mgfv-card-social-post .mgfv-social-embed iframe{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  height:620px!important;
  min-height:620px!important;
  max-height:none!important;
  border:0!important;
}
@media(max-width:600px){
  .mgfv-card-social-post .mgfv-social-embed iframe{
    height:680px!important;
    min-height:680px!important;
  }
}
/* Keep the landscape mini-player dimensions and controls unchanged. */
.mgfv-overlay .mgfv-card.mgfv-card-social-post{
  aspect-ratio:16/9;
}
.mgfv-overlay.mgfv-is-fullscreen .mgfv-card.mgfv-card-social-post{
  aspect-ratio:auto;
}


/* v1.1.8: click-to-load preview for Threads/X embeds only. */
.mgfv-social-preview{
  position:relative;width:100%;height:100%;min-height:0;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#18202b,#394657);
  cursor:pointer;
}
.mgfv-social-preview>img{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
}
.mgfv-social-preview-shade{
  position:absolute;inset:0;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:10px;
  background:rgba(0,0,0,.22);
}
.mgfv-social-preview-play{
  width:58px;height:58px;border:0;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  padding:0 0 0 4px;background:rgba(255,255,255,.96);color:#172033;
  font-size:25px;line-height:1;box-shadow:0 3px 16px rgba(0,0,0,.25);
  cursor:pointer;
}
.mgfv-social-preview-note{
  max-width:90%;padding:6px 10px;border-radius:99px;
  color:#fff;background:rgba(0,0,0,.55);font-size:11px;
  line-height:1.35;text-align:center;
}
