.theme-gallery { margin-top: 1rem; }
.theme-gallery .back-link { display: inline-block; margin-bottom: 2rem; color: #3aa99f; text-decoration: none; font-weight: 600; }
.theme-gallery .back-link:hover { text-decoration: underline; }
.theme-gallery .theme-block { margin-bottom: 3rem; }
.theme-gallery .theme-block h2 { margin-bottom: .25rem; }
.theme-gallery .theme-block .theme-type { font-size: .85rem; color: #888; margin: 0 0 .9rem; }
.theme-gallery .thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.theme-gallery .thumb { display: block; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0,0,0,.1); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.theme-gallery .thumb:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,.18); border-color: #3aa99f; }
.theme-gallery .thumb img { display: block; width: 100%; height: 130px; object-fit: cover; }
.theme-gallery .lightbox { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(10,10,10,.94); opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 1000; }
.theme-gallery .lightbox:target { opacity: 1; pointer-events: auto; }
.theme-gallery .lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.theme-gallery .lightbox-close { position: absolute; top: 1.25rem; right: 1.75rem; font-size: 2.25rem; line-height: 1; color: #fff; text-decoration: none; opacity: .85; }
.theme-gallery .lightbox-close:hover { opacity: 1; color: #3aa99f; }
.theme-gallery .lightbox-arrow { position: absolute; top: 50%; transform: translateY(-50%); font-size: 2.75rem; color: #fff; text-decoration: none; padding: .5rem 1.1rem; user-select: none; opacity: .8; line-height: 1; }
.theme-gallery .lightbox-arrow:hover { opacity: 1; color: #3aa99f; }
.theme-gallery .lightbox-prev { left: .5rem; }
.theme-gallery .lightbox-next { right: .5rem; }
.theme-gallery .lightbox-counter { position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%); color: #fff; font-size: .85rem; opacity: .7; letter-spacing: .03em; }
