/* Latest Posts Popup — v3.3.5 (2-line title clamp) */
#lpp-overlay {
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.42);
  backdrop-filter:saturate(140%) blur(2px);
  z-index:9998;
}

#lpp-popup {
  display:none;
  position:fixed;
  width:min(680px, 90vw);
  max-height:86vh;
  overflow:auto;
  background:#ffffff;
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,.28);
  padding:12px 12px 16px;
  z-index:9999;
  font-family:system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Position presets */
#lpp-popup.pos-center { left:50%; top:50%; transform:translate(-50%,-50%); }
#lpp-popup.pos-tc     { left:50%; top:24px; transform:translateX(-50%); }
#lpp-popup.pos-bc     { left:50%; bottom:24px; transform:translateX(-50%); }
#lpp-popup.pos-tl     { left:24px; top:24px; }
#lpp-popup.pos-tr     { right:24px; top:24px; }
#lpp-popup.pos-bl     { left:24px; bottom:24px; }
#lpp-popup.pos-br     { right:24px; bottom:24px; }

#lpp-popup.pos-abs { transform:none !important; }

.lpp-header{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
  padding:6px 6px 12px;
  border-bottom:1px solid #efefef;
  margin:0 0 12px 0;
}
.lpp-header h3{
  margin:0;
  font-size:20px; line-height:1.25;
}

#lpp-popup.draggable .lpp-header{ cursor:move; }

.lpp-close{
  flex:0 0 auto;
  width:46px; height:46px;
  border:none; border-radius:12px;
  background:#111; color:#fff;
  cursor:pointer;
  font-size:30px; line-height:1;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 6px 14px rgba(0,0,0,.18);
}
.lpp-close:hover{ filter:brightness(1.08); }
.lpp-close:focus{ outline:3px solid #99c2ff; outline-offset:2px; }

.lpp-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  aspect-ratio:1/1;
}

/* Square card */
.lpp-card{
  position:relative;
  border:1px solid #eee;
  border-radius:12px;
  overflow:hidden;
  aspect-ratio:1/1;
  display:grid;
  grid-template-rows: 62% 38%;
  background:#000;
}
.lpp-card.empty{ background:#f6f6f6; border-style:dashed; }

.lpp-card::before{
  content:"";
  position:absolute; inset:0;
  background-image:var(--lpp-bg);
  background-size:cover;
  background-position:center;
  filter:blur(20px) brightness(0.7);
  transform:scale(1.1);
  z-index:0;
}

.lpp-media{
  position:relative;
  z-index:1;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  overflow:hidden;
}
.lpp-media img, .lpp-placeholder{
  width:100%; height:100%;
  object-fit:contain;
  object-position: top center;
  background:transparent;
}

/* Title area */
.lpp-card-body{
  position:relative;
  z-index:1;
  padding:10px 12px;
  background:linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,.35) 30%, rgba(0,0,0,.6) 100%);
  color:#fff;
  display:flex; align-items:center;
}
.lpp-title{
  margin:0;
  font-size:14px;
  line-height:1.3;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Full card stretched link */
.lpp-link{
  position:absolute; inset:0; z-index:3;
  text-indent:-9999px;
  overflow:hidden;
}
.screen-reader-text{
  position:absolute !important;
  width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

.lpp-footer{
  margin-top:12px;
  text-align:center;
  font-size:12px;
  color:#777;
  border-top:1px solid #efefef;
  padding-top:10px;
}

@media (max-width:360px){
  #lpp-popup{ width:min(640px, 92vw); padding:10px; }
  .lpp-close{ width:46px; height:46px; font-size:30px; }
}
