.tongui-content-feed{
  display:grid;
  grid-template-columns:repeat(var(--tongui-feed-cols-desktop,5),minmax(0,1fr));
  gap:var(--tongui-feed-gap,8px);
  width:100%;
}
.tongui-feed-card{
  position:relative;
  display:block;
  aspect-ratio:1/1;
  overflow:hidden;
  border-radius:var(--tongui-feed-radius,10px);
  background:#eee;
  color:#fff;
  text-decoration:none;
  isolation:isolate;
}
.tongui-feed-card>img{
  width:100%;height:100%;display:block;object-fit:cover;
  transition:transform .25s ease;
}
.tongui-feed-card:hover>img,.tongui-feed-card:focus-visible>img{transform:scale(1.025)}
.tongui-feed-type{
  position:absolute;z-index:4;left:10px;top:9px;
  width:22px;height:22px;display:grid;place-items:center;
  color:#fff;filter:drop-shadow(0 1px 3px rgba(0,0,0,.55));
  pointer-events:none;
}
.tongui-feed-type svg{width:100%;height:100%;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tongui-feed-type--video svg path:last-child{fill:currentColor;stroke:currentColor}
.tongui-feed-play{
  position:absolute;z-index:4;left:50%;top:50%;transform:translate(-50%,-50%);
  width:48px;height:48px;border:2px solid rgba(255,255,255,.95);border-radius:50%;
  display:grid;place-items:center;color:#fff;
  background:rgba(0,0,0,.18);
  box-shadow:0 2px 12px rgba(0,0,0,.25);
  backdrop-filter:blur(1px);
  pointer-events:none;
  transition:transform .2s ease,background .2s ease;
}
.tongui-feed-play svg{width:25px;height:25px;display:block;fill:currentColor;stroke:none;margin-left:2px}
.tongui-feed-card:hover .tongui-feed-play,.tongui-feed-card:focus-visible .tongui-feed-play{transform:translate(-50%,-50%) scale(1.06);background:rgba(0,0,0,.28)}
.tongui-feed-overlay{
  position:absolute;z-index:2;inset:0;
  display:flex;flex-direction:column;justify-content:flex-end;gap:8px;
  padding:14px;
  background:linear-gradient(to top,rgba(0,0,0,.72),rgba(0,0,0,.08) 70%);
  opacity:0;transition:opacity .2s ease;
  pointer-events:none;
}
.tongui-feed-card:hover .tongui-feed-overlay,.tongui-feed-card:focus-visible .tongui-feed-overlay{opacity:1}
.tongui-feed-caption{font-size:13px;line-height:1.35;font-weight:600;color:#fff}
.tongui-feed-date{font-size:11px;line-height:1.2;color:rgba(255,255,255,.85)}
.tongui-feed-empty{padding:12px;border:1px dashed currentColor;font-size:13px}
@media(max-width:1024px){.tongui-content-feed{grid-template-columns:repeat(var(--tongui-feed-cols-tablet,3),minmax(0,1fr))}}
@media(max-width:767px){
  .tongui-content-feed{grid-template-columns:repeat(var(--tongui-feed-cols-mobile,2),minmax(0,1fr))}
  .tongui-feed-overlay{display:none}
}
@media(prefers-reduced-motion:reduce){.tongui-feed-card>img,.tongui-feed-overlay{transition:none}}

/* Elementor editor preview: keep the shortcode grid constrained like frontend. */
.elementor-editor-active .tongui-content-feed,
.elementor-editor-preview .tongui-content-feed{
  display:grid!important;
  grid-template-columns:repeat(var(--tongui-feed-cols-desktop,5),minmax(0,1fr))!important;
  width:100%!important;
  max-width:100%!important;
  align-items:stretch;
}
.elementor-editor-active .tongui-feed-card,
.elementor-editor-preview .tongui-feed-card{
  width:100%!important;
  min-width:0!important;
  aspect-ratio:1/1!important;
}
.elementor-editor-active .tongui-feed-card>img,
.elementor-editor-preview .tongui-feed-card>img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}
