.screenshot-intro {
  max-width: 880px;
}
.screenshot-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 30px;
}
.screenshot-filter {
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.screenshot-filter[aria-current="page"] {
  color: white;
  background: #0076f5;
  border-color: #0076f5;
}
.screenshot-filter:focus-visible,
.screenshot-image-link:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
.screenshot-group {
  margin: 45px 0 60px;
}
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.screenshot-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--surface);
  overflow: hidden;
}
.screenshot-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 20px;
  background: linear-gradient(145deg, var(--blue-soft), var(--mint));
}
.screenshot-image-link img {
  display: block;
  width: 100%;
  height: 430px;
  object-fit: contain;
  border-radius: 12px;
}
.screenshot-card figcaption {
  padding: 22px;
  overflow-wrap: anywhere;
}
.screenshot-card h3 {
  margin: 16px 0 12px;
  font-size: 1.35rem;
}
.screenshot-card figcaption > p {
  white-space: pre-line;
}
.screenshot-language {
  display: inline-block;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.5;
  white-space: normal;
}
.screenshot-language-fallback {
  color: #724107;
  background: #fff2d8;
  border-color: #d8b56d;
}
[data-theme="dark"] .screenshot-language-fallback {
  color: #ffdf98;
  background: #332916;
  border-color: #806333;
}
.screenshot-empty {
  text-align: center;
  padding: 65px 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(140deg, var(--blue-soft), var(--surface), var(--mint));
}
.screenshot-empty > svg {
  width: 48px;
  height: 48px;
  color: var(--blue);
}
.screenshot-empty h2 {
  margin: 25px 0 15px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}
.screenshot-empty p {
  max-width: 620px;
  margin: 0 auto 28px;
  color: var(--muted);
}
.screenshot-viewing {
  overflow: hidden;
}
.screenshot-dialog {
  max-width: min(1000px, calc(100vw - 32px));
  width: max-content;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--text);
  background: var(--solid);
  box-shadow: var(--shadow);
}
.screenshot-dialog:not([open]) {
  display: none;
}
.screenshot-dialog::backdrop {
  background: rgb(3 10 22 / 82%);
  backdrop-filter: blur(8px);
}
.screenshot-dialog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}
.screenshot-dialog-toolbar form {
  margin: 0;
}
.screenshot-dialog h2 {
  max-width: 760px;
  font-size: 1.4rem;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.screenshot-dialog > img {
  display: block;
  max-width: 100%;
  max-height: 65dvh;
  width: auto;
  height: auto;
  margin: 18px auto 0;
  object-fit: contain;
}
.screenshot-dialog > .muted {
  max-width: 760px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
@media (max-width: 1000px) {
  .screenshot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .screenshot-grid { grid-template-columns: 1fr; }
  .screenshot-filter { padding: 10px 14px; font-size: .9rem; }
  .screenshot-image-link img { height: 400px; }
  .screenshot-empty { padding: 45px 22px; }
  .screenshot-dialog { padding: 16px; }
  .screenshot-dialog-toolbar { gap: 16px; }
}

/* The overview is a separate destination, not another category filter. */
.screenshot-browse {
  display: grid;
  grid-template-columns: minmax(230px, .85fr) minmax(0, 2fr);
  align-items: center;
  gap: 28px;
  margin: 0 0 48px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
}
.screenshot-overview-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
}
.screenshot-overview-link[aria-current="page"] {
  border-color: var(--blue);
  background: var(--blue-soft);
}
.screenshot-overview-link strong,
.screenshot-overview-link .small { display: block; }
.screenshot-overview-link strong { margin-bottom: 5px; }
.screenshot-overview-symbol {
  display: grid;
  flex: 0 0 30px;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}
.screenshot-overview-symbol span { height: 13px; border-radius: 4px; background: var(--blue); }
.screenshot-overview-symbol span:nth-child(2) { opacity: .65; }
.screenshot-overview-symbol span:nth-child(3) { opacity: .4; }
.screenshot-category-navigation { padding-left: 28px; border-left: 1px solid var(--line); }
.screenshot-category-navigation > p { margin: 0 0 12px; }
.screenshot-browse .screenshot-filters { margin: 0; }
.screenshot-overview { margin: 0 0 70px; }
.screenshot-overview-count { margin: 12px 0 0; }
.screenshot-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}
.screenshot-overview-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  color: var(--text);
  background: linear-gradient(145deg, var(--blue-soft), var(--surface));
  transition: border-color .18s ease, box-shadow .18s ease;
}
.screenshot-overview-card:nth-child(4n+2) { background: linear-gradient(145deg, var(--mint), var(--surface)); }
.screenshot-overview-card:nth-child(4n+3) { background: linear-gradient(145deg, var(--violet), var(--surface)); }
.screenshot-overview-card:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.screenshot-overview-link:hover { border-color: var(--blue); }
.screenshot-overview-link:focus-visible,
.screenshot-overview-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.screenshot-overview-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.screenshot-overview-card h3 { margin: 0; font-size: 1.5rem; overflow-wrap: anywhere; }
.screenshot-overview-arrow { color: var(--blue); font-size: 1.6rem; }
.screenshot-overview-total { margin: 8px 0 22px; }
.screenshot-preview-strip { display: flex; align-items: flex-start; justify-content: center; gap: 12px; }
.screenshot-preview { flex: 1 1 0; min-width: 0; max-width: 150px; margin: 0; }
.screenshot-preview img {
  display: block;
  width: 100%;
  height: 245px;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 8px 10px rgb(0 25 60 / 10%));
}
.screenshot-preview-language {
  padding: 6px;
  margin: 8px 0 0;
  border-radius: 8px;
  color: var(--muted);
  font-size: .72rem;
  text-align: center;
  overflow-wrap: anywhere;
}
.screenshot-preview-language.screenshot-language-fallback { color: #724107; }
[data-theme="dark"] .screenshot-preview-language.screenshot-language-fallback { color: #ffdf98; }
.screenshot-overview-action { display: block; margin-top: auto; padding-top: 24px; }
@media (max-width: 850px) {
  .screenshot-browse { grid-template-columns: 1fr; gap: 20px; }
  .screenshot-category-navigation { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .screenshot-overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .screenshot-browse { padding: 16px; }
  .screenshot-overview-card { padding: 22px 18px; }
  .screenshot-preview-strip { gap: 8px; }
  .screenshot-preview img { height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  .screenshot-overview-card { transition: none; }
}
