.screen-catalog {
  height: 100%;
  width: 100%;
  min-height: 0;
  min-width: 0;
  box-sizing: border-box;
  padding: clamp(12px, 2.6vh, 30px) var(--pad, 5vw) clamp(12px, 2.4vh, 28px);
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.8vh, 20px);
  color: var(--ink);
}
.sc-header, .sc-pager, .sc-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sc-header { flex: none; gap: 12px; }
.sc-heading {
  margin: 0;
  font: 500 clamp(25px, 4.8vh, 60px)/1.16 var(--serif);
  letter-spacing: -.04em;
}
.sc-switch, .sc-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  white-space: nowrap;
  font: 400 clamp(12px, 1.5vh, 16px)/1.2 var(--sans);
  color: var(--ink);
  text-decoration: none;
}
.sc-switch { padding-inline: 4px; border-bottom: 1px solid currentColor; }
.sc-grid {
  display: grid;
  flex: 1;
  min-height: 0;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: clamp(8px, 1.9vh, 22px) clamp(10px, 1.7vw, 27px);
}
.sc-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sc-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.sc-photo {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  background: var(--line);
}
.sc-photo img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sc-photo-alternate { opacity: 0; transition: opacity .34s ease-out; }
.sc-frame {
  position: absolute;
  inset: clamp(6px, 1.4vh, 15px);
  pointer-events: none;
  opacity: 0;
  transform: scale(1.03);
  color: #fffef6;
  transition: opacity .3s ease, transform .3s ease;
}
.sc-frame::before, .sc-frame::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-style: solid;
  border-color: currentColor;
  filter: drop-shadow(0 1px 1px #19352acd);
}
.sc-frame::before { left: 0; top: 0; border-width: 1px 0 0 1px; }
.sc-frame::after { right: 0; bottom: 0; border-width: 0 1px 1px 0; }
.sc-card:focus-visible :is(.sc-frame,.sc-photo-alternate) { opacity: 1; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .sc-card:hover :is(.sc-frame,.sc-photo-alternate) { opacity: 1; transform: none; }
}
@media (hover: none) {
  .sc-frame { opacity: .9; transform: none; }
}
.sc-caption {
  min-width: 0;
  gap: 9px;
  padding: clamp(5px, 1vh, 12px) 0;
}
.sc-caption-text { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.sc-title {
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  font: 500 clamp(15px, 2.3vh, 25px)/1.26 var(--serif);
}
.sc-meta, .sc-summary, .sc-page-status { font: 400 clamp(11px, 1.5vh, 14px)/1.4 var(--sans); color: var(--muted); }
.sc-meta { white-space: nowrap; }
.sc-arrow { flex: none; font-size: 16px; }
.sc-pager {
  flex: none;
  gap: clamp(6px, 1.6vw, 22px);
  justify-content: flex-end;
}
.sc-summary { margin-right: auto; }
.sc-page-link {
  padding: 0 clamp(9px, 1.3vw, 18px);
  border: 1px solid var(--line);
}
.sc-page-link[aria-disabled=true] { opacity: .4; }
.sc-page-status { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sc-solo { grid-template-columns: minmax(0, 1fr); }
.sc-solo .sc-photo img { object-fit: contain; background: #e6e7de; }
.screen-catalog a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 700px) {
  .sc-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-caption-text { flex-direction: column; align-items: flex-start; gap: 2px; }
  .sc-caption { align-items: flex-start; }
  .sc-pager { gap: 9px; }
}
@media (min-aspect-ratio: 17/10) and (max-height: 600px) {
  .sc-index { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .sc-results:not(.sc-solo) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sc-caption-text { flex-direction: column; align-items: flex-start; gap: 1px; }
}
@media (max-height: 440px) {
  .screen-catalog { padding-block: 6px; gap: 6px; }
  .sc-heading { font-size: 23px; }
  .sc-page-link, .sc-switch { min-height: 32px; }
  .sc-title { font-size: 14px; }
  .sc-arrow, .sc-meta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-photo-alternate, .sc-frame { transition: none; transform: none; }
}

.sc-header-actions { display: flex; gap: clamp(10px, 1.8vw, 24px); align-items: center; }
.sc-search-form {
  flex: none;
  display: flex;
  min-width: 0;
  width: min(100%, 540px);
  border-bottom: 1px solid var(--ink);
}
.sc-search-input {
  flex: 1;
  min-width: 0;
  padding: 6px 4px 6px 0;
  background: transparent;
  color: var(--ink);
  border: 0;
  font: 400 16px/1.4 var(--sans);
}
.sc-search-submit {
  min-height: 38px;
  padding: 0 16px;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  font: 400 14px/1 var(--sans);
  cursor: pointer;
}
.sc-search-empty { margin: 3px 0; font-size: 14px; color: var(--muted); }
@media (max-height: 440px) {
  .sc-search-input { padding-block: 2px; }
  .sc-search-submit { min-height: 28px; }
}
