:root{
  --bg:#f9f9f9; --text:#222; --muted:#888; --card:#fff;
  --accent:#333; --chip:#eee; --shadow:0 2px 8px rgba(0,0,0,.1);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--text)}

.site-header{padding:20px 16px;text-align:center}
.site-header h1{margin:0 0 10px}

.filters{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.filters button{
  padding:10px 16px;border:0;border-radius:6px;cursor:pointer;
  background:var(--chip);font-weight:600
}
.filters button.active{background:var(--accent);color:#fff}

.gallery{
  display:flex;flex-wrap:wrap;gap:20px;justify-content:center;
  padding:12px 20px 40px;max-width:1200px;margin:0 auto;
}

.card{
  width:280px;background:var(--card);border-radius:10px;
  box-shadow:var(--shadow);overflow:hidden;transition:transform .2s ease;
}
.card:hover{transform:translateY(-2px)}
.card img,.card video{width:100%;height:auto;display:block}

.caption{padding:12px 14px;font-size:.95rem;line-height:1.5;color:#333}

.site-footer{padding:20px;text-align:center;color:var(--muted)}

/* ===== Lightbox ===== */
.lb{
  position:fixed; inset:0; background:rgba(0,0,0,.9);
  display:grid; grid-template-columns:64px 1fr 64px; grid-template-rows:56px 1fr auto;
  align-items:center; justify-items:center; z-index:9999;
}
.lb.hidden{display:none}
.lb-img{
  max-width:95vw; max-height:80vh; object-fit:contain;
  grid-column:1 / -1; grid-row:2 / 3; border-radius:8px;
}
.lb-cap{
  color:#eee; text-align:center; padding:12px 16px; max-width:900px;
  grid-column:1 / -1; grid-row:3 / 4; font-size:.95rem; line-height:1.5;
}
.lb-close{
  position:absolute; top:10px; right:14px;
  width:44px; height:44px; border:0; border-radius:50%;
  font-size:36px; line-height:36px; color:#fff; background:transparent; cursor:pointer;
}
.lb-nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:52px; height:52px; border-radius:50%; border:0;
  font-size:34px; color:#111; background:#fff; opacity:.9; cursor:pointer;
  display:grid; place-items:center;
}
.lb-prev{left:12px}
.lb-next{right:12px}

@media (max-width:520px){ .card{width:46%} }
@media (max-width:380px){ .card{width:100%} }
