/* Long translated descriptions scroll without pushing the template actions away. */
#preview .detail.gallery-detail { min-height:0; overflow:hidden; }
#preview .gallery-detail #previewdesc { max-height:calc(73vh - 210px); overflow:auto; overscroll-behavior:contain; padding-right:5px; margin-bottom:16px; scrollbar-width:thin; }
#preview .gallery-detail [data-original-download] { flex-shrink:0; font-size:13px; color:#555; }
@media(max-width:760px){
 #preview .dialog:has(.gallery-detail){display:flex;flex-direction:column;}
 #preview .gallery-detail{display:flex;flex:0 0 auto;order:0;padding:16px;gap:8px;max-height:38dvh;}
 #preview .gallery-detail h2{position:static;margin:0 32px 0 0;font-size:16px;}
 #preview .gallery-detail #previewdesc{display:block;max-height:72px;margin:0;font-size:12px;line-height:18px;}
 #preview .gallery-detail .primary{width:100%;height:40px;margin:0;flex-shrink:0;}
 #preview .dialog:has(.gallery-detail) .previewpages{order:1;flex:1;min-height:0;}
 #preview .gallery-detail [data-original-download]{margin-top:0!important;padding:6px!important;}
}
