/* Drawing-preview gallery [6e37e376]. Themeable through the same variables as the rest of the module; the fallbacks are the
   MontiPrint poster palette. No dependencies, no inline styles. Radius max 4 px (fleet rule). */
.rg{
  --rg-paper:var(--paper,#d5c6af); --rg-card:var(--card,#e6dcc9); --rg-ink:var(--ink,#253033); --rg-muted:var(--muted,#4c473c);
  --rg-accent:var(--mustard,#aa9e38); --rg-radius:var(--radius,4px); --rg-gap:12px;
  --rg-ms:900ms; --rg-fit:contain; /* contain keeps the whole print visible (portrait and landscape files); cover crops */
  color:var(--rg-ink); font:16px/1.4 var(--font,system-ui,sans-serif);
}
.rg *{box-sizing:border-box}
.rg figure{margin:0}
.rg figcaption{font-size:.9rem;font-weight:700;margin-top:6px;overflow-wrap:anywhere}
.rg button{font:inherit;color:inherit;cursor:pointer}
.rg :focus-visible{outline:3px solid var(--rg-ink);outline-offset:2px}
.rg-empty{padding:24px 16px;border:2px dashed var(--rg-muted);border-radius:var(--rg-radius);text-align:center;font-weight:700}

/* group tabs: one row, scrolls sideways on a phone, 44 px targets */
.rg-tabs{display:flex;gap:8px;margin:0 0 16px;overflow-x:auto;padding:2px 2px 6px;scrollbar-width:thin}
.rg-tab{flex:0 0 auto;min-height:44px;padding:0 16px;border:2px solid var(--rg-ink);border-radius:var(--rg-radius);background:var(--rg-card);font-weight:700;display:inline-flex;align-items:center;gap:8px;box-shadow:2px 2px 0 rgba(37,48,51,.3)}
.rg-tab[aria-selected="true"]{background:var(--rg-accent);box-shadow:none}
.rg-n{font-size:.78rem;font-weight:700;min-width:22px;height:22px;padding:0 6px;border-radius:3px;background:var(--rg-ink);color:var(--rg-card);display:inline-flex;align-items:center;justify-content:center}

.rg-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--rg-gap)}
@media (min-width:720px){.rg-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:1040px){.rg-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}

.rg-tile{position:relative;display:block;width:100%;aspect-ratio:1/1;padding:0;border:2px solid var(--rg-ink);border-radius:var(--rg-radius);background:var(--rg-card);overflow:hidden;box-shadow:3px 3px 0 rgba(37,48,51,.26);-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.rg-tile img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:var(--rg-fit,contain)}
.rg-plain{cursor:default}
/* the original lies over the drawing and is wiped in from the top, like the EKTA reveal; hidden = fully clipped */
.rg-top{position:absolute;inset:0;clip-path:inset(0 0 100% 0);transition:clip-path var(--rg-ms) cubic-bezier(.65,0,.35,1)}
.rg-on .rg-top{clip-path:inset(0 0 0 0)}
.rg-state{position:absolute;left:8px;bottom:8px;z-index:2;padding:3px 9px;border-radius:3px;background:var(--rg-card);color:var(--rg-ink);border:1px solid var(--rg-ink);font-size:.75rem;font-weight:700;pointer-events:none}
@media (prefers-reduced-motion:reduce){.rg-top{transition:none}}
