.model-gallery{min-width:0}
.model-gallery-note{color:var(--muted);font-size:14px;margin:-8px 0 20px}
.model-gallery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.model-gallery-link{position:relative;display:block;overflow:hidden;aspect-ratio:3/2;background:var(--mist);border:1px solid var(--line);border-radius:5px;cursor:zoom-in}
.model-gallery-link img{display:block;width:100%;height:100%;object-fit:contain;transition:transform .2s ease}
.model-gallery-link:hover img{transform:scale(1.04)}
.model-gallery-link:after{content:'\f065';font-family:'Font Awesome 6 Free';font-weight:900;position:absolute;right:8px;bottom:8px;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#fff;color:var(--ink);box-shadow:0 1px 5px #0002}
.model-gallery-dialog{width:min(1120px,94vw);max-width:94vw;max-height:94dvh;padding:0;border:0;border-radius:8px;color:var(--ink);background:#fff;box-shadow:0 20px 80px #0005}
.model-gallery-dialog::backdrop{background:rgba(8,12,16,.87)}
.model-gallery-dialog:not([open]){display:none}
.model-gallery-panel{padding:16px}
.model-gallery-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.model-gallery-toolbar h2{font-size:25px;margin:0}
.model-gallery-dialog button{display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:5px;background:#fff;color:var(--ink);font:700 15px Arial,sans-serif;cursor:pointer}
.model-gallery-dialog button:hover{border-color:var(--red);color:var(--red)}
.model-gallery-dialog button:focus-visible{outline:3px solid var(--red);outline-offset:3px}
.model-gallery-dialog figure{margin:0}
.model-gallery-large{display:block;width:100%;height:min(65dvh,720px);object-fit:contain;background:var(--mist)}
.model-gallery-large[hidden]{display:none}
.model-gallery-caption{padding:12px 0;font-size:15px}
.model-gallery-footer{display:flex;justify-content:space-between;gap:12px;align-items:center}
.model-gallery-counter{font-size:14px;color:var(--muted);font-variant-numeric:tabular-nums}
.model-gallery-error{padding:40px 20px;text-align:center;color:var(--muted)}
html:has(.model-gallery-dialog[open]){overflow:hidden}
@media(max-width:680px){.model-gallery-panel{padding:12px}.model-gallery-large{height:58dvh}.model-gallery-dialog button{font-size:14px;padding:8px 12px}}
@media(prefers-reduced-motion:reduce){.model-gallery-link img{transition:none}}
