.gallery-shell { max-width: 1160px; padding-top: clamp(14px,4vw,42px); }
.gallery-header { align-items: end; margin-bottom: 20px; }
.gallery-header .head-tools .link { display: inline-flex; align-items: center; white-space: nowrap; }
.gallery-filter { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; color: var(--quiet); font-size: .84rem; font-weight: 700; }
.gallery-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.gallery-card { display: grid; grid-template-rows: auto 1fr; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: inherit; }
.gallery-card:hover { border-color: #efd097; text-decoration: none; }
.gallery-card canvas { display: block; width: 100%; height: auto; aspect-ratio: 420 / 230; background: #30516a; }
.gallery-card > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px 10px; padding: 13px; }
.gallery-card h2 { grid-column: 1 / -1; overflow-wrap: anywhere; }
.gallery-card p { color: var(--quiet); font-size: .73rem; }
.gallery-card .visit { color: var(--ink); font-weight: 750; }
.gallery-card .counts { grid-column: 1 / -1; color: #f6e2b1; word-spacing: .10em; }
.gallery-pages { display: flex; gap: 7px; justify-content: center; margin-top: 15px; }
#gallery-status:not(:empty) { display: block; padding: 18px; min-height: 64px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--quiet); }
@media(max-width: 870px) { .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width: 520px) {
  .gallery-header { align-items: start; flex-direction: column; gap: 10px; }
  .gallery-header .head-tools { justify-content: start; }
  .gallery-grid { grid-template-columns: 1fr; }
}
