/* ── Edit everything below to style your gallery ── */

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  body { font-family: sans-serif; background: #fff; color: #111; }

  /* Header */
  .header {
    padding: 2rem;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
  }
  .header h1   { font-size: 2rem; font-weight: 300; }
  .header span { color: #aaa; font-size: 0.85rem; }

  /* Grid */
  .grid {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
  }

  .card { overflow: hidden; aspect-ratio: 4/3; cursor: pointer; background: #f0f0f0; }
  .card img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .card:hover img { opacity: 0.85; }

  /* Footer */
  .footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
  }
  .next-btn {
    padding: 0.6rem 1.4rem;
    background: #111;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
  }
  .next-btn:hover { background: #333; }

  /* Lightbox */
  .lb {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 99;
    align-items: center;
    justify-content: center;
  }
  .lb.open { display: flex; }

  .lb-bg { position: absolute; inset: 0; cursor: zoom-out; }

  .lb img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    position: relative;
    z-index: 1;
    pointer-events: none;
  }

  .lb-prev, .lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    width: 44px;
    height: 44px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 2;
  }
  .lb-prev { left: 1rem; }
  .lb-next { right: 1rem; }

  .lb-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: none;
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1rem;
    z-index: 2;
  }

  .lb-caption {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    z-index: 2;
    white-space: nowrap;
  }

  #error { padding: 2rem; color: #c00; }