.station-gallery {
  container-type: inline-size;
  margin-block: 16px 24px;
  border-block-start: 1px solid var(--line);
  padding-block-start: 14px;
  scroll-margin-block-start: 12px;
}
.station-gallery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px 12px;
  margin-block-end: 9px;
}
.station-gallery-head h2 {font-size: clamp(19px, 3vw, 23px)}
.station-gallery:focus {outline: none}
.station-gallery:focus-visible .station-gallery-head h2 {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
.station-paper-status {color: var(--muted); font-size: 14px}
.station-paper-list {
  display: grid;
  grid-template-columns: repeat(var(--desktop-columns,4),minmax(0,1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.station-paper-list a {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-decoration: none;
  background: var(--paper);
}
.station-paper-list a:is(:hover,:focus-visible) {border-color: var(--accent)}
.station-paper-image {
  display: grid;
  place-items: center;
  aspect-ratio: 250/354;
  background: var(--selected);
  overflow: hidden;
}
.station-paper-image img {display: block; width: 100%; height: 100%; object-fit: contain}
.station-paper-placeholder {padding: 8px; color: var(--muted); font-size: 13px; text-align: center}
.station-paper-title {
  padding: 6px 8px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}
.station-gallery[data-titles="hide"] .station-paper-title {display: none}
.station-gallery[data-title-size="small"] .station-paper-title {font-size: 14px}
.station-gallery[data-title-size="large"] .station-paper-title {font-size: 18px}
.station-paper-footer {display: grid; justify-items: center; gap: 7px; margin-block-start: 16px}
.station-paper-more {
  display: block;
  min-height: 44px;
  margin: 0;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
  background: var(--paper);
  font: inherit;
  cursor: pointer;
}
.station-paper-more[hidden] {display: none}
.station-paper-more:is(:hover,:focus-visible) {background: var(--selected)}
@media (max-width:1023px) {
  .station-paper-list {grid-template-columns: repeat(var(--tablet-columns,3),minmax(0,1fr))}
}
@media (max-width:700px), (horizontal-viewport-segments:2),
  (max-width:1023px) and (max-height:700px) and (orientation:landscape) and (pointer:coarse) {
  .station-paper-list {grid-template-columns: repeat(var(--mobile-columns,2),minmax(0,1fr)); gap: 5px 8px}
  .station-paper-list[data-stagger="true"] {--station-papers-compact: 1; align-items: start}
  .station-paper-list[data-packed] {position: relative; display: block; block-size: var(--station-paper-height)}
  .station-paper-list[data-packed] li {
    position: absolute;
    inset-block-start: var(--station-paper-top,0px);
    inline-size: calc((100% - 8px)/2);
  }
  .station-paper-list[data-packed] li:nth-child(odd) {inset-inline-start: 0}
  .station-paper-list[data-packed] li:nth-child(even) {inset-inline-end: 0}
  .station-paper-list[data-stagger="true"] a {height: auto}
  .station-paper-list[data-stagger="true"] li:is(:nth-child(4n+2),:nth-child(4n+3)) .station-paper-image {aspect-ratio: 250/314}
  .station-paper-title {padding: 5px 6px}
}

.station-paper-list a:is(:hover,:focus-visible) .station-paper-title {background: var(--selected)}
.station-paper-list a:focus-visible {outline-offset: 2px}
.station-paper-title {
  flex: 1;
  display: grid;
  place-items: center;
  border-block-start: 1px solid var(--station-rule,var(--line));
  color: var(--ink);
  text-wrap: pretty;
}
.station-paper-more {
  border-color: var(--station-rule,var(--line));
  background: var(--station-wash,var(--paper));
  font-weight: 650;
}

@container (max-width: 395px) {
  .station-paper-title {padding-inline: 4px; text-wrap: balance}
}

.station-gallery-head {
  padding: 8px 10px;
  border: 1px solid var(--station-rule,var(--line));
  border-radius: 8px;
  background: var(--station-wash,var(--paper));
}

.station-paper-list a {
  border-radius: 9px;
  box-shadow: 0 1px 3px color-mix(in srgb,var(--ink) 8%,transparent);
}

.station-paper-title {
  background: var(--paper);
  min-block-size: 34px;
}

.station-paper-footer {gap: 5px}

.station-paper-image[data-loading] {
  background: linear-gradient(150deg,var(--station-wash,var(--paper)),var(--selected));
}

.station-paper-footer {
  padding: 9px 10px;
  border: 1px solid var(--station-rule,var(--line));
  border-radius: 8px;
  background: var(--station-wash,var(--paper));
}

.station-paper-footer .station-paper-status {font-variant-numeric: tabular-nums}
.station-paper-more {
  min-inline-size: min(100%,164px);
  background: var(--paper);
}

@container (min-width: 440px) {
  .station-paper-footer {
    grid-template-columns: minmax(0,1fr) auto;
    justify-items: start;
    align-items: center;
  }
}
