/* Keep the original script-generated rows and sizing on wide screens. */
.qsl-gallery {
  text-align: center;
}

.qsl-gallery a[href^="index.htm?"] {
  display: inline-block;
  padding: 4px 7px;
}

.qsl-gallery > table {
  margin: 10px auto;
}

/* Stack the original thumbnail cells instead of widening the page. */
@media (max-width: 940px) {
  .qsl-gallery > table,
  .qsl-gallery > table > tbody,
  .qsl-gallery > table > tbody > tr {
    display: block;
  }

  .qsl-gallery > table > tbody > tr > td {
    display: inline-block;
    vertical-align: top;
    margin: 0 4px 10px;
  }
}
