.pg-gallery{min-width:0;width:100%}.pg-main{display:block;width:100%;aspect-ratio:1;padding:0;border:0;border-radius:12px;overflow:hidden;background:var(--theme-surface-soft,#f5f5f5);color:var(--theme-text,#333)}button.pg-main{cursor:zoom-in}.pg-image,.pg-placeholder{position:relative;display:flex;width:100%;height:100%;align-items:center;justify-content:center}.pg-image img{width:100%;height:100%;object-fit:contain}.pg-placeholder{flex-direction:column;gap:8px;font-size:14px}.pg-loading{position:absolute;bottom:8px;padding:4px 8px;background:var(--theme-surface,white);border-radius:4px;font-size:12px}.pg-status{margin:8px 0;overflow-wrap:anywhere;font-size:14px;color:var(--theme-muted,#555)}.pg-controls{display:flex;align-items:center;justify-content:space-between;gap:8px}.pg-gallery button{font:inherit}.pg-controls button,.pg-dialog-head button{min-width:44px;min-height:44px;padding:8px 12px;background:var(--theme-surface,white);color:var(--theme-text,#333);border:1px solid var(--theme-line,#bbb);border-radius:8px;cursor:pointer}.pg-gallery button:disabled{opacity:.45;cursor:default}.pg-gallery :focus-visible{outline:3px solid var(--theme-focus,#995000);outline-offset:2px}.pg-thumbs{display:flex;gap:8px;overflow-x:auto;padding:4px;margin-top:8px}.pg-thumbs button{flex:0 0 64px;height:64px;padding:2px;border:2px solid var(--theme-line,#ddd);border-radius:8px;overflow:hidden;background:var(--theme-surface-soft,#f5f5f5);cursor:pointer}.pg-thumbs button[aria-pressed=true]{border-color:#a74700}.pg-thumbs .pg-loading,.pg-thumbs .pg-placeholder span{display:none}.pg-dialog{width:min(640px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);box-sizing:border-box;padding:16px;border:0;border-radius:12px;overflow-y:auto}.pg-dialog::backdrop{background:rgb(0 0 0/70%)}.pg-dialog-head{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:12px}.pg-dialog h2{margin:0;font-size:18px;overflow-wrap:anywhere}.pg-dialog .pg-main{max-height:60dvh}.pg-gallery .pg-stage{min-width:0;position:relative}.pg-gallery .pg-track{display:flex;width:100%;aspect-ratio:1;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;border-radius:12px}.pg-gallery .pg-track::-webkit-scrollbar{display:none}.pg-gallery .pg-slide{display:block;box-sizing:border-box;flex:0 0 100%;min-width:0;width:100%;aspect-ratio:1;padding:0;border:0;border-radius:12px;overflow:hidden;scroll-snap-align:start;scroll-snap-stop:always;background:var(--theme-surface-soft,#f5f5f5);color:var(--theme-text,#333)}.pg-gallery button.pg-slide{cursor:zoom-in}.pg-gallery .pg-track .pg-slide:focus-visible{outline-offset:-5px}.pg-gallery .pg-dots{display:flex;flex-wrap:wrap;justify-content:center}.pg-gallery .pg-dots button{display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--theme-muted,#555);cursor:pointer}.pg-gallery .pg-dots button span{width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.4}.pg-gallery .pg-dots [aria-current=true] span{opacity:1;width:8px;height:8px}.pg-gallery>.pg-controls{justify-content:center}.pg-gallery .pg-thumbs-few,.pg-gallery>.pg-controls button{display:none}.pg-gallery .pg-dialog .pg-track{max-height:60dvh}.pg-gallery .pg-dialog .pg-slide{height:100%;max-height:none}@media (min-width:1024px){.pg-gallery:has(>.pg-thumbs){display:grid;grid-template-columns:72px minmax(0,1fr);column-gap:12px}.pg-gallery .pg-stage{grid-column:2;grid-row:1}.pg-gallery>.pg-controls,.pg-gallery>.pg-main,.pg-gallery>.pg-status{grid-column:2}.pg-gallery>.pg-thumbs{display:flex;flex-direction:column;grid-column:1;grid-row:1;height:0;min-height:100%;box-sizing:border-box;overflow-x:hidden;overflow-y:auto;margin-top:0}.pg-gallery .pg-thumbs button{flex:0 0 64px;width:64px}.pg-gallery>.pg-stage .pg-track{overflow:hidden;scroll-snap-type:none}.pg-gallery>.pg-stage .pg-slide[aria-hidden=true]{display:none}.pg-gallery>.pg-controls{grid-column:2}.pg-gallery>.pg-controls button{display:block;visibility:hidden}.pg-gallery:focus-within>.pg-controls button,.pg-gallery:hover>.pg-controls button{visibility:visible}}