/* Deynu 16.6.3 — Reels Polish final
   Dedicated viewer-only overrides loaded after legacy/profile Reel CSS. */
.social-profile-reels-viewer .reels-viewer{
  height:100dvh!important;
  min-height:100dvh!important;
  scroll-snap-type:y mandatory!important;
  overscroll-behavior-y:contain!important;
  touch-action:pan-y;
  scrollbar-width:none;
  background:#000!important;
}
.social-profile-reels-viewer .reels-viewer::-webkit-scrollbar{display:none}
.social-profile-reels-viewer .reel-card[data-reel-item]{
  height:100dvh!important;
  min-height:100dvh!important;
  scroll-snap-align:start!important;
  scroll-snap-stop:always!important;
  contain:none!important;
  background:#000!important;
}
.social-profile-reels-viewer .reel-card[data-reel-item] .reel-stage{
  height:100%!important;
  min-height:0!important;
  inset:0!important;
  background:#000!important;
}
.social-profile-reels-viewer .reel-card[data-reel-item] .reel-stage>video,
.social-profile-reels-viewer .reel-card[data-reel-item] .reel-stage>img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  background:#000!important;
}
.social-profile-reels-viewer .reel-card[data-reel-item].is-active-reel{outline:0!important}
.social-profile-reels-viewer .reel-actions{
  bottom:calc(104px + env(safe-area-inset-bottom))!important;
}
.social-profile-reels-viewer .reel-meta{
  bottom:calc(102px + env(safe-area-inset-bottom))!important;
}
.social-profile-reels-viewer .social-bottom-nav{
  bottom:calc(8px + env(safe-area-inset-bottom))!important;
}
@supports not (height:100dvh){
  .social-profile-reels-viewer .reels-viewer,
  .social-profile-reels-viewer .reel-card[data-reel-item]{height:100vh!important;min-height:100vh!important}
}
@media (prefers-reduced-motion:reduce){
  .social-profile-reels-viewer .reels-viewer{scroll-behavior:auto!important}
}


/* Deynu 16.6.3.1 — Reels comments sheet + composer hotfix.
   The comments modal is nested in each Reel, so it must escape the Reel stacking context
   and keep the new-comment composer visible above mobile safe areas. */
.social-profile-reels-viewer .social-comments-sheet{
  position:fixed!important;
  inset:0!important;
  z-index:120!important;
}
.social-profile-reels-viewer .social-comments-sheet .comments-backdrop{z-index:0!important}
.social-profile-reels-viewer .comments-panel{
  z-index:1!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  max-height:86dvh!important;
  padding-bottom:calc(12px + env(safe-area-inset-bottom))!important;
}
.social-profile-reels-viewer .comments-list{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  padding-bottom:8px;
  scrollbar-width:thin;
}
.social-profile-reels-viewer .comments-compose{
  position:relative!important;
  bottom:auto!important;
  z-index:4!important;
  flex:0 0 auto!important;
  margin:8px -2px -2px!important;
  padding:10px 2px 2px!important;
  border-top:1px solid #edf1ef;
  background:#fff!important;
}
body.social-modal-open .social-profile-reels-viewer .social-bottom-nav{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
@media (min-width:900px){
  .social-profile-reels-viewer .comments-panel{max-height:78dvh!important}
}
