#publicGallery .gallery-tile,#featuredGallery .gallery-tile,#publicGallery [data-gallery-src]{position:relative}
.gallery-like-control,.lightbox-gallery-like{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:#fff;background:#0b1016cc;border:1px solid #ffffff22;backdrop-filter:blur(9px);box-shadow:0 4px 16px #0007;transition:transform .16s ease,border-color .16s ease,background .16s ease,color .16s ease}
.gallery-like-control{position:absolute;z-index:6;top:10px;right:10px;min-width:42px;height:34px;padding:0 9px;border-radius:999px;cursor:pointer;user-select:none}
.gallery-like-control svg,.lightbox-gallery-like svg{width:17px;height:17px;fill:transparent;stroke:currentColor;stroke-width:1.9;transition:fill .16s ease,transform .16s ease}
.gallery-like-control:hover,.lightbox-gallery-like:hover{transform:translateY(-1px);border-color:#f25768aa;background:#151b22e8}
.gallery-like-control.liked,.lightbox-gallery-like.liked{color:#ff6d80;border-color:#f2576877;background:#351d25e8}
.gallery-like-control.liked svg,.lightbox-gallery-like.liked svg{fill:currentColor}
.gallery-like-control.liked:hover svg,.lightbox-gallery-like.liked:hover svg{transform:scale(1.08)}
.gallery-like-count{font-size:.72rem;line-height:1;font-weight:850;min-width:8px;text-align:center}
.gallery-like-control.busy,.lightbox-gallery-like.busy{pointer-events:none;opacity:.6}
.gallery-like-control.owner-view{cursor:default;pointer-events:none}
.lightbox-gallery-like{height:42px;min-width:58px;padding:0 12px;border-radius:999px;font:inherit;font-weight:800;cursor:pointer;margin-left:auto}
#imageLightbox .lightbox-toolbar #lightboxGalleryLike+#closeLightbox{margin-left:6px}
@media(max-width:640px){.gallery-like-control{top:8px;right:8px;height:32px;min-width:40px;padding:0 8px}.lightbox-gallery-like{height:38px;min-width:52px;padding:0 10px}}

.gallery-comment-control,.lightbox-gallery-comments{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:#fff;background:#0b1016dd;border:1px solid #ffffff33;cursor:pointer;border-radius:999px;padding:8px;font:inherit}
.gallery-comment-control{position:absolute;z-index:6;top:50px;right:10px;width:34px;height:34px;box-sizing:border-box;box-shadow:0 4px 16px #0007}
.gallery-comment-control svg,.lightbox-gallery-comments svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}
.gallery-comment-control:focus-visible,.gallery-like-control:focus-visible{outline:3px solid #ff8d9a;outline-offset:2px}
.gallery-feedback{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:90vw;padding:12px 18px;background:#252e38;color:#fff;border:1px solid #5e6b79;border-radius:10px;z-index:10000}
.gallery-comments-dialog{box-sizing:border-box;width:min(600px,95vw);max-height:90dvh;overflow:auto;background:#151b21;color:#e7edf3;border:1px solid #465361;border-radius:16px;padding:20px;font:inherit}
.gallery-comments-dialog::backdrop{background:#000b}
.gallery-comments-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}.gallery-comments-dialog h2{font-size:1.1rem;margin:0 0 12px}
.gallery-comments-dialog button{cursor:pointer;background:#293642;color:#fff;border:1px solid #4a5866;border-radius:8px;padding:8px 12px;font:inherit}.gallery-comments-dialog button:disabled{opacity:.5;cursor:wait}
.gallery-comment-preview{display:block;max-height:220px;max-width:100%;margin:0 auto 16px;border-radius:8px;object-fit:contain}
.gallery-comments-status{font-size:.85rem;color:#b9c5d0}.gallery-comments-list{display:grid;gap:12px;margin:12px 0}.gallery-comment{padding:12px;background:#0e151b;border-radius:10px;overflow-wrap:anywhere}.gallery-comment>div{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.gallery-comment time{font-size:.7rem;color:#93a3b2}.gallery-comment>div button{margin-left:auto;font-size:.75rem}.gallery-comment p{white-space:pre-wrap;margin:8px 0 0}
.gallery-comments-dialog form{display:grid;gap:8px;margin-top:18px}.gallery-comments-dialog textarea{box-sizing:border-box;width:100%;resize:vertical;background:#0e151b;color:#fff;border:1px solid #526273;border-radius:8px;padding:10px;font:inherit;min-height:85px}.gallery-emoji-picker{display:flex;flex-wrap:wrap;gap:5px}.gallery-emoji-picker button{padding:6px 8px;font-family:'Noto Color Emoji','Apple Color Emoji','Segoe UI Emoji',sans-serif}.gallery-comments-dialog button[type=submit]{background:#bd3d55}.gallery-comments-login{color:#ff8fa5}
.gallery-comments-dialog [hidden],.lightbox-gallery-comments[hidden],.lightbox-gallery-like[hidden],.gallery-feedback[hidden]{display:none!important}
@media(max-width:640px){.gallery-comment-control{top:46px;right:8px}.lightbox-gallery-comments span{display:none}.gallery-comments-dialog{padding:14px}}

/* Floating glass comments, inspired by short-form social overlays. */
#imageLightbox{position:relative}
.gallery-comments-dialog{
  position:absolute!important;
  top:82px!important;
  right:22px!important;
  bottom:22px!important;
  left:auto!important;
  margin:0!important;
  width:min(370px,calc(100% - 44px))!important;
  max-height:none!important;
  padding:0!important;
  overflow:hidden!important;
  display:flex;
  flex-direction:column;
  background:rgba(14,20,27,.54)!important;
  color:#f5f7f9!important;
  border:1px solid rgba(255,255,255,.12)!important;
  border-radius:22px!important;
  box-shadow:0 24px 70px rgba(0,0,0,.44)!important;
  -webkit-backdrop-filter:blur(22px) saturate(1.15)!important;
  backdrop-filter:blur(22px) saturate(1.15)!important;
  z-index:30;
}
.gallery-comments-dialog::backdrop{background:transparent!important;backdrop-filter:none!important}
.gallery-comments-dialog header{
  flex:0 0 auto;
  padding:14px 15px 10px!important;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg,rgba(255,255,255,.035),transparent);
}
.gallery-comments-dialog h2{font-size:.98rem!important;margin:0!important;letter-spacing:-.01em}
.gallery-comments-dialog [data-close-comments]{
  width:32px;height:32px;padding:0!important;border-radius:999px!important;
  background:rgba(255,255,255,.07)!important;border:1px solid rgba(255,255,255,.1)!important
}
.gallery-comment-preview{display:none!important}
.gallery-comments-status{
  flex:0 0 auto;
  margin:8px 14px 0!important;
  min-height:16px;
  color:#aeb9c3!important;
  font-size:.72rem!important;
}
.gallery-comments-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  display:flex!important;
  flex-direction:column;
  gap:9px!important;
  margin:8px 0 0!important;
  padding:0 12px 12px!important;
  scrollbar-width:thin;
}
.gallery-comment{
  width:fit-content;
  max-width:92%;
  padding:9px 11px!important;
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px 16px 16px 5px!important;
  background:rgba(7,12,18,.46)!important;
  box-shadow:0 7px 20px rgba(0,0,0,.16);
  -webkit-backdrop-filter:blur(10px);
  backdrop-filter:blur(10px);
}
.gallery-comment>div{gap:6px!important}
.gallery-comment strong{font-size:.76rem}
.gallery-comment time{font-size:.62rem!important;color:#91a0ad!important}
.gallery-comment>div button{
  margin-left:6px!important;
  padding:2px 6px!important;
  border:0!important;
  background:transparent!important;
  color:#ff93a3!important;
  font-size:.65rem!important;
}
.gallery-comment p{
  margin:5px 0 0!important;
  font-size:.86rem!important;
  line-height:1.38;
  color:#f0f3f6;
}
.gallery-comments-dialog [data-more-comments]{
  flex:0 0 auto;
  align-self:center;
  margin:0 0 8px;
  padding:6px 10px!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.06)!important;
  border-color:rgba(255,255,255,.09)!important;
  font-size:.72rem!important;
}
.gallery-comments-dialog form{
  flex:0 0 auto;
  display:grid!important;
  gap:7px!important;
  margin:0!important;
  padding:10px 12px 12px!important;
  border-top:1px solid rgba(255,255,255,.08);
  background:rgba(5,9,13,.34);
  -webkit-backdrop-filter:blur(12px);
  backdrop-filter:blur(12px);
}
.gallery-comments-dialog form label{display:none!important}
.gallery-comments-dialog textarea{
  min-height:64px!important;
  max-height:120px;
  resize:none!important;
  border-radius:14px!important;
  padding:10px 11px!important;
  background:rgba(5,10,15,.52)!important;
  border:1px solid rgba(255,255,255,.12)!important;
}
.gallery-emoji-picker{
  display:flex!important;
  flex-wrap:nowrap!important;
  gap:5px!important;
  overflow-x:auto;
  padding-bottom:2px;
}
.gallery-emoji-picker button{
  flex:0 0 31px;
  width:31px;height:31px;
  padding:0!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.07)!important;
  border:1px solid rgba(255,255,255,.09)!important;
}
.gallery-comments-dialog button[type=submit]{
  min-height:38px;
  border-radius:12px!important;
  border:0!important;
  background:linear-gradient(135deg,#f25768,#d73f59)!important;
  font-weight:850;
}
.gallery-comments-login{
  margin:12px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(5,10,15,.5);
}
@media(max-width:820px){
  .gallery-comments-dialog{
    position:absolute!important;
    top:auto!important;
    right:10px!important;
    bottom:10px!important;
    left:10px!important;
    width:auto!important;
    height:min(58dvh,520px)!important;
    border-radius:20px!important;
  }
}

/* Keep gallery navigation reachable and show all quick emojis without a horizontal scrollbar. */
@media(min-width:821px){
  #imageLightbox .gallery-comments-dialog{
    right:88px!important;
    width:min(430px,calc(100% - 176px))!important;
  }
  #imageLightbox .lightbox-next,
  #imageLightbox [data-lightbox-next],
  #imageLightbox .gallery-next,
  #imageLightbox .next{
    z-index:45!important;
    pointer-events:auto!important;
  }
}
.gallery-comments-dialog .gallery-emoji-picker{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:7px!important;
  overflow:visible!important;
  overflow-x:visible!important;
  padding:2px 0 0!important;
}
.gallery-comments-dialog .gallery-emoji-picker::-webkit-scrollbar{display:none!important}
.gallery-comments-dialog .gallery-emoji-picker button{
  width:100%!important;
  min-width:0!important;
  height:34px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border-radius:999px!important;
  font-size:18px!important;
}
@media(min-width:1180px){
  .gallery-comments-dialog .gallery-emoji-picker{
    grid-template-columns:repeat(8,minmax(0,1fr))!important;
  }
}
@media(max-width:820px){
  .gallery-comments-dialog .gallery-emoji-picker{
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
  }
}

/* Persistent comments rail: the lightbox stays the same size while browsing. */
@media(min-width:980px){
  #imageLightbox .lightbox-stage{
    margin-right:470px!important;
    width:auto!important;
  }
  #imageLightbox .gallery-comments-dialog{
    top:88px!important;
    right:20px!important;
    bottom:46px!important;
    width:440px!important;
    max-height:none!important;
  }
  #imageLightbox .gallery-comments-dialog [data-close-comments]{
    display:none!important;
  }
  #imageLightbox .lightbox-gallery-comments{
    display:none!important;
  }
  #imageLightbox .next-image{
    right:12px!important;
    z-index:50!important;
  }
}
@media(min-width:980px) and (max-width:1220px){
  #imageLightbox .lightbox-stage{margin-right:400px!important}
  #imageLightbox .gallery-comments-dialog{width:370px!important}
}
@media(max-width:979px){
  #imageLightbox .lightbox-gallery-comments{display:inline-flex!important}
}
