/* CPF Archive Viewer v0.1 — intentionally scoped; no theme-wide styles. */
.cpf-viewer{width:100%;max-width:850px;margin:0 auto;color:#111}
.cpf-viewer *{box-sizing:border-box}
.cpf-viewer__gallery{display:grid;grid-template-columns:72px minmax(0,1fr);gap:8px;align-items:stretch}
.cpf-viewer__thumbs{height:min(650px,calc(100vw - 90px));max-height:650px;min-height:340px;overflow-y:auto;overflow-x:hidden;scrollbar-width:none;-ms-overflow-style:none;display:flex;flex-direction:column;gap:10px;padding:2px;align-items:flex-start}
.cpf-viewer__thumbs::-webkit-scrollbar{display:none}
.cpf-viewer__thumb{appearance:none;background:transparent;border:2px solid transparent;border-radius:0;padding:0;flex:0 0 68px;width:68px;height:68px;cursor:pointer;overflow:hidden}
.cpf-viewer__thumb[aria-current="true"]{border-color:#111}
.cpf-viewer__thumb img{width:100%;height:100%;object-fit:cover;display:block}
.cpf-viewer__stage{position:relative;display:flex;justify-content:center;align-items:center;background:#fff;min-height:340px;height:min(650px,calc(100vw - 90px));max-height:650px}
.cpf-viewer__main{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain;display:block}
.cpf-viewer__arrow{appearance:none;border:0;border-radius:0;cursor:pointer;position:absolute;z-index:2;top:50%;transform:translateY(-50%);width:36px;height:44px;color:#111;background:rgba(255,255,255,.88);font-size:27px;line-height:1;padding:0}
.cpf-viewer__arrow:hover{background:#fff}.cpf-viewer__arrow--previous{left:8px}.cpf-viewer__arrow--next{right:8px}
.cpf-viewer__thumb:focus-visible,.cpf-viewer__arrow:focus-visible{outline:2px solid #946747;outline-offset:3px}
.cpf-viewer__count{text-align:center;font-size:12px;color:#777;margin:15px 0}
@media(max-width:620px){.cpf-viewer__gallery{grid-template-columns:1fr;gap:12px}.cpf-viewer__stage{height:min(88vw,550px);min-height:220px;grid-row:1}.cpf-viewer__thumbs{height:auto;min-height:0;max-height:none;overflow-x:auto;overflow-y:hidden;flex-direction:row;grid-row:2;width:100%;padding-bottom:6px}.cpf-viewer__thumb{flex:0 0 56px;width:56px;height:56px}}
@media(prefers-reduced-motion:reduce){.cpf-viewer__thumbs{scroll-behavior:auto}}
