.wg-search { display: flex; gap: 8px; max-width: 520px; margin: 2rem 0 1.5rem; }
.wg-search input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; font: inherit; color: var(--dark); background: var(--white); border: 1px solid var(--border); }
.wg-search input:focus { outline: 2px solid var(--gold); outline-offset: 0; }
.wg-search button { height: 48px; padding: 0 22px; font: inherit; color: var(--white); background: var(--dark); border: 0; cursor: pointer; }
.wg-search button:hover { background: var(--gold); }

.wg-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2rem; }
.wg-cats a { padding: 6px 15px; font-size: 14px; color: var(--mid); background: var(--white); border: 1px solid var(--border); }
.wg-cats a:hover { border-color: var(--gold); }
.wg-cats a.on { color: var(--white); background: var(--dark); border-color: var(--dark); }

.wg-albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px; }
.wg-album { display: grid; gap: 6px; min-width: 0; }
.wg-cover { display: block; aspect-ratio: 5 / 4; overflow: hidden; background: var(--light); }
.wg-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.wg-album:hover .wg-cover img { transform: scale(1.03); }
.wg-name { font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }
.wg-meta { font-size: 13px; color: var(--mid); }
.wg-empty { padding: 3rem 0; color: var(--mid); }

.wg-back { display: inline-block; margin-bottom: 1rem; font-size: 14px; color: var(--mid); }
.wg-back:hover { color: var(--gold); }
.wg-title { font-size: 30px; margin-top: 1.6rem; overflow-wrap: anywhere; }
.wg-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 1rem 0 2rem; }
.wg-photo { display: block; aspect-ratio: 5 / 4; overflow: hidden; background: var(--light); }
.wg-photo img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.wg-photo:hover img { opacity: .85; }

.wg-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2rem; }
.wg-pages a { min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--mid); background: var(--white); border: 1px solid var(--border); }
.wg-pages a.on { color: var(--white); background: var(--dark); border-color: var(--dark); }

.wg-box { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(15, 15, 14, .94); touch-action: pan-y; }
.wg-box img { max-width: calc(100vw - 32px); max-height: calc(100vh - 80px); width: auto; height: auto; object-fit: contain; }
.wg-box button { position: absolute; width: 48px; height: 48px; font-size: 24px; line-height: 1; color: #fff; background: rgba(255, 255, 255, .12); border: 0; cursor: pointer; }
.wg-box button:hover { background: rgba(255, 255, 255, .24); }
.wg-box-close { top: 12px; right: 12px; }
.wg-box-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.wg-box-next { right: 12px; top: 50%; transform: translateY(-50%); }
.wg-box-count { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 14px; color: #d6d2c8; }

@media (max-width: 640px) {
  .wg-albums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .wg-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .wg-name { font-size: 15px; }
  .wg-title { font-size: 25px; }
  .wg-box-prev, .wg-box-next { top: auto; bottom: 6px; transform: none; }
}
