/* Gallery page: the grid of cards and the render-thread meter. Tokens come from playground.css. */
#gallery-view { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
.gv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.gv-bar input[type="search"] { font: inherit; font-size: 13px; color: var(--text); background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; width: 230px; max-width: 100%; }
.threads { display: flex; align-items: center; gap: 5px; }
.thread { width: 10px; height: 10px; border-radius: 3px; background: var(--line); transition: background .15s; }
.thread.idle { background: var(--ok); opacity: .55; }
.thread.busy { background: var(--accent); opacity: .6; }
.thread.wait { background: var(--accent); opacity: .35; }
.thread.gpu { background: var(--accent); }
.thread.boot { background: var(--muted); animation: pulse 1s ease-in-out infinite alternate; }
.thread.dead { background: var(--err); }
.tlabel { color: var(--muted); font-size: 12px; margin-left: 4px; font-variant-numeric: tabular-nums; }
@keyframes pulse { from { opacity: .3; } to { opacity: 1; } }

.gv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.gv-empty { color: var(--muted); grid-column: 1 / -1; margin: 0; }
.gcard { display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.gcard:hover { border-color: var(--muted); }
.gcard .thumb { position: relative; display: block; aspect-ratio: 1; max-width: 100%; background: #0d1017; }
.gcard canvas { width: 100%; height: 100%; display: block; }
.gcard .tstat { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 9px 7px; text-align: left; color: #c3cad6; font: 11px/1.4 var(--mono); background: linear-gradient(transparent, rgba(8,10,14,.85)); pointer-events: none; word-break: break-word; }
.gcard.bad .tstat { color: #f4a3a8; top: 0; display: flex; align-items: center; background: rgba(8,10,14,.6); }
.gbody { padding: 9px 12px 4px; display: grid; gap: 2px; min-width: 0; }
.gname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmeta { color: var(--muted); font-size: 12px; display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.gacts { display: flex; gap: 6px; padding: 6px 12px 12px; }
.gacts .btn, .gacts button { font: inherit; font-size: 13px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; text-decoration: none; cursor: pointer; }
.gacts .btn:hover, .gacts button:hover { border-color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .thread.boot { animation: none; } }
@media (max-width: 820px) {
  .gv-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
