.pv { --pv-ink: #23415f; --pv-line: #cfe0ee; display: grid; gap: 12px; margin: 18px 0 8px; }
.pv:not(.pv-ready) { display: block; }
.pv:focus-visible { outline: 3px solid #7cc4ff; outline-offset: 4px; border-radius: 18px; }
.pv-bar { display: flex; align-items: center; gap: 8px; }
.pv-gap { flex: 1; }
.pv-counter { font-weight: 800; font-size: .9rem; color: var(--pv-ink); background: #eef6fd; border: 1px solid var(--pv-line); border-radius: 999px; padding: 6px 14px; }
.pv-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--pv-line); border-radius: 12px; background: #fff; color: var(--pv-ink); cursor: pointer; text-decoration: none; transition: background .15s, transform .15s, box-shadow .15s; }
.pv-btn svg { width: 20px; height: 20px; }
.pv-btn:hover:not(:disabled) { background: #eaf4ff; box-shadow: 0 4px 12px #23415f22; }
.pv-btn:active:not(:disabled) { transform: scale(.94); }
.pv-btn:disabled { opacity: .35; cursor: default; }
.pv-btn[aria-pressed="true"] { background: #dff0ff; border-color: #7cc4ff; }
.pv-stage { position: relative; display: grid; place-items: center; min-height: 260px; max-height: 78vh; overflow: hidden; border-radius: 18px; background: #f3f8fc; border: 1px solid var(--pv-line); cursor: default; touch-action: pan-y; user-select: none; }
.pv-img { display: block; max-width: 100%; max-height: 78vh; width: auto; height: auto; object-fit: contain; transition: transform .25s ease; animation: pv-in .25s ease; }
@keyframes pv-in { from { opacity: 0; } to { opacity: 1; } }
.pv-prev, .pv-next { position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 48px; border-radius: 50%; background: #ffffffe6; box-shadow: 0 6px 18px #23415f33; z-index: 2; }
.pv-prev { left: 12px; }
.pv-next { right: 12px; }
.pv-single .pv-prev, .pv-single .pv-next { display: none; }
.pv-thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; }
.pv-thumb { position: relative; flex: 0 0 auto; width: 86px; height: 86px; padding: 0; border: 2px solid transparent; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--pv-line); overflow: hidden; cursor: pointer; scroll-snap-align: center; opacity: .7; transition: opacity .15s, border-color .15s, transform .15s; }
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pv-thumb:hover { opacity: 1; transform: translateY(-2px); }
.pv-thumb.on { opacity: 1; border-color: #3d9be9; }
.pv-thumb-n { position: absolute; right: 4px; bottom: 4px; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #23415fd9; color: #fff; font-size: .72rem; font-weight: 800; text-align: center; }
.pv:fullscreen, .pv.pv-fake-full { background: #101c2b; padding: 16px; margin: 0; grid-template-rows: auto 1fr auto; position: fixed; inset: 0; z-index: 1000; }
.pv:fullscreen .pv-stage, .pv.pv-fake-full .pv-stage { max-height: none; min-height: 0; background: #0b1420; border-color: #ffffff22; }
.pv:fullscreen .pv-img, .pv.pv-fake-full .pv-img { max-height: calc(100vh - 190px); }
.pv:fullscreen .pv-counter, .pv.pv-fake-full .pv-counter { background: #ffffff1a; color: #fff; border-color: #ffffff33; }
@media (max-width: 640px) { .pv-prev, .pv-next { width: 40px; height: 40px; } .pv-thumb { width: 64px; height: 64px; } .pv-stage { min-height: 200px; } }
@media (prefers-reduced-motion: reduce) { .pv-img, .pv-btn, .pv-thumb { transition: none; animation: none; } }
.page-public-gallery .public-material-images.pv-ready { display: grid; grid-template-columns: minmax(0, 1fr); padding: 18px; }
.page-public-gallery .public-material-images.pv-ready img.pv-img { width: auto; max-width: 100%; }
.page-public-gallery .public-material-images.pv-ready .pv-thumb img { width: 100%; }
.pv-download:has(.pv-dl-text) { width: auto; padding: 0 12px; gap: 6px; grid-auto-flow: column; font-weight: 800; font-size: .85rem; }
