.kb-galerie {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0;
    margin: 0;
    align-items: start;
}
.kb-galerie__item {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease;
    position: relative;
}
.kb-galerie__label {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    pointer-events: none;
    z-index: 2;
}
.kb-galerie__item:hover {
    transform: scale(1.02);
    opacity: 0.92;
}
.kb-galerie__item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
}
@media (max-width: 1024px) {
    .kb-galerie { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .kb-galerie { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

.kb-lb {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.kb-lb[hidden] { display: none; }
.kb-lb__figure {
    margin: 0;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kb-lb__img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 4px;
    display: block;
    transition: opacity 0.2s ease;
}
.kb-lb__img.loading { opacity: 0; }
.kb-lb__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s, background 0.2s;
}
.kb-lb__close:hover { opacity: 1; background: rgba(255,255,255,0.15); }
.kb-lb__prev,
.kb-lb__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s, background 0.2s;
}
.kb-lb__prev:hover, .kb-lb__next:hover { opacity: 1; background: rgba(255,255,255,0.25); }
.kb-lb__prev { left: 20px; }
.kb-lb__next { right: 20px; }
.kb-lb__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.8;
    z-index: 10;
}
@media (max-width: 600px) {
    .kb-lb__prev { left: 8px; }
    .kb-lb__next { right: 8px; }
    .kb-lb__counter { font-size: 12px; }
}
