/* The gallery dialog (shared/gallery.js): Wireframe Components, Slide show shapes. */
.gal-modal { max-width: calc(100vw - 32px); }
.gal-modal .modal-body { padding-top: 4px; }
.gal { display: flex; flex-direction: column; gap: 10px; height: min(68vh, 640px); }
.gal-top { display: flex; align-items: center; gap: 12px; flex: none; }
.gal-search { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 14px; background: var(--surface); color: var(--text); }
.gal-search:focus { outline: 2px solid var(--prog); outline-offset: -1px; border-color: transparent; }
.gal-count { flex: none; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gal-main { flex: 1; min-height: 0; display: flex; gap: 14px; }
.gal-list { flex: 1; min-width: 0; overflow-y: auto; padding: 2px 4px 12px 2px; }
.gal-sec { position: sticky; top: 0; z-index: 1; background: var(--surface, #fff); padding: 8px 2px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-bottom: 8px; }
.gal-tile { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px 6px 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font: inherit; color: var(--text); text-align: center; min-width: 0; }
.gal-tile:hover, .gal-tile.on { border-color: var(--prog); box-shadow: 0 0 0 1px var(--prog); }
.gal-tile:focus-visible { outline: 2px solid var(--prog); outline-offset: 2px; }
.gal-pv { display: flex; align-items: center; justify-content: center; height: 64px; border-radius: 6px; background: var(--sunk); color: #43536b; overflow: hidden; }
.gal-pv > svg { width: 100%; height: 100%; display: block; }
.gal-pv > .material-symbols-outlined { font-size: 30px; }
.gal-label { font-size: 12px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gal-none { padding: 30px 8px; text-align: center; color: var(--muted); }
.gal-detail { flex: none; width: 250px; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--sunk); overflow-y: auto; }
.gal-big { display: flex; align-items: center; justify-content: center; height: 180px; border-radius: 9px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: #43536b; padding: 12px; }
.gal-big > svg { width: 100%; height: 100%; display: block; }
.gal-big > .material-symbols-outlined { font-size: 72px; }
.gal-name { margin: 6px 0 0; font-size: 16px; }
.gal-note, .gal-hint { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.gal-hint { color: var(--muted); font-size: 12.5px; }
.gal-add { align-self: flex-start; margin-top: 4px; }
.gal-detail-empty { margin: auto 0; text-align: center; font-size: 13px; line-height: 1.5; color: var(--muted); }
/* while a tile is dragged out, the dialog gets out of the way */
.modal-overlay.gal-dragging { opacity: 0.08; pointer-events: none; transition: opacity 0.12s; }
@media (max-width: 760px) {
  .gal-detail { display: none; }
  .gal { height: 72vh; }
}
