.swiper-control-top[data-pt-gallery] > :is(.swiper-custom-left, .swiper-custom-right) { display: none; }
.pt-gallery-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-block: .75rem;
    color: #47423e;
    font-size: .9rem;
}
.pt-gallery-tools[hidden], .pt-gallery-arrow[hidden] { display: none; }
.pt-gallery-tools:not([hidden]) + .empty-space { display: none; }
button.pt-gallery-all, button.pt-gallery-close, button.pt-pswp-grid {
    height: auto;
    min-height: 44px;
    padding: .45rem 1rem;
    border: 1px solid #d6d0cd;
    border-radius: 2rem;
    background: white;
    color: #272322;
    font: inherit;
    font-weight: 650;
    text-transform: none;
    line-height: 1.3;
    cursor: pointer;
}
button.pt-gallery-all::before, button.pt-pswp-grid::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: .5em;
    vertical-align: -.08em;
    background: repeating-linear-gradient(90deg, transparent 0 6px, white 6px 8px),
                repeating-linear-gradient(0deg, currentColor 0 6px, white 6px 8px);
}
button.pt-gallery-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-content: center;
    width: 44px;
    height: 44px;
    padding: 0 0 4px;
    border: 1px solid #d6d0cd;
    border-radius: 50%;
    box-shadow: 0 2px 8px #0001;
    background: #fff;
    color: #322e2c;
    font: 32px/1 Arial, sans-serif;
    cursor: pointer;
}
button.pt-gallery-arrow[hidden] { display: none; }
.pt-gallery-prev { left: 8px; }
.pt-gallery-next { right: 8px; }
.pt-gallery-tools button:hover, .pt-gallery-arrow:hover, .pt-gallery-close:hover { border-color: #990000; color: #990000; }
dialog.pt-photo-dialog {
    width: min(960px, calc(100vw - 2rem));
    max-width: none;
    max-height: min(86dvh, 900px);
    margin: auto;
    padding: 0;
    border: 1px solid #ddd5d0;
    border-radius: 16px;
    background: #fff;
    color: #262322;
    overflow: hidden;
}
.pt-photo-dialog[open] { display: flex; flex-direction: column; }
.pt-photo-dialog::backdrop { background: rgb(25 20 18 / 65%); }
body:has(.pt-photo-dialog[open]) { overflow: hidden; }
.pt-photo-dialog > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: none;
    gap: .65rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid #e7e1de;
}
.pt-photo-dialog > header strong { font-size: clamp(1rem, 2vw, 1.25rem); }
.pt-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    padding: 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}
button.pt-photo-tile {
    display: block;
    position: relative;
    height: auto;
    padding: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid #dfd9d5;
    border-radius: 9px;
    background: white;
    cursor: zoom-in;
}
.pt-photo-tile img { width: 100%; height: 100%; display: block; object-fit: contain; }
.pt-photo-tile span {
    position: absolute;
    bottom: .35rem;
    left: .35rem;
    min-width: 1.6rem;
    padding: .15rem .35rem;
    border-radius: 1rem;
    background: #282323d9;
    color: white;
    font: 600 .8rem/1.3 sans-serif;
}
.pt-photo-tile[aria-current], .pt-photo-tile:hover { border-color: #990000; }
:is(.pt-gallery-tools, .pt-photo-dialog, .pswp) button:focus-visible, .pt-gallery-arrow:focus-visible {
    outline: 2px solid #ae1818;
    outline-offset: 2px;
}
.pswp button.pt-pswp-grid {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    min-height: 36px;
    font-size: 14px;
    white-space: nowrap;
}
@media (max-width: 600px) {
    dialog.pt-photo-dialog { width: calc(100vw - 1rem); max-height: 90dvh; }
    .pt-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; padding: .65rem; }
    .pt-photo-dialog > header { padding: .5rem .7rem; }
    .pswp button.pt-pswp-grid { font-size: 12px; padding-inline: .65rem; }
}
