:root {
  color-scheme: light;
  --background: #f5f6f8;
  --ink: #182232;
  --muted: #546173;
  --border: #d7dde5;
  --blue: #245eea;
  --surface: #fff;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--background);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
select,
a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: #dce8ff;
}
button,
select,
input {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
button,
select {
  cursor: pointer;
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-block: 10px;
  padding-inline: 14px 44px;
  line-height: 1.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23546173' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}
:dir(rtl) select {
  background-position: left 14px center;
}
select:hover {
  border-color: #9aa7b8;
}
button {
  padding: 10px 16px;
  font-weight: 600;
}
button:hover,
a:hover {
  color: #1748bb;
}
button:hover {
  border-color: var(--blue);
  background: #f1f5ff;
}
a {
  color: #1748bb;
  text-underline-offset: 4px;
}
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
[hidden] {
  display: none !important;
}
.wrap {
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: max(24px, env(safe-area-inset-left));
}
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: max(28px, env(safe-area-inset-top));
}
.brand {
  font-size: 20px;
  font-weight: 750;
}
.language {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.language select {
  min-width: 132px;
}
.intro {
  flex-basis: 100%;
  margin-block: 38px 28px;
  max-width: 720px;
}
.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0 0 16px;
}
.description {
  max-width: 620px;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 14px;
}
.capture {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.filters {
  display: flex;
  align-items: end;
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.filters label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 8px;
}
.search-field {
  flex: 1;
  min-width: 0;
}
.search-row {
  display: flex;
  gap: 8px;
}
input {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  font-size: 16px;
}
input::placeholder {
  color: #657184;
}
.category-field {
  width: 240px;
}
.category-field select {
  width: 100%;
}
.results-bar {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-block: 20px 6px;
  font-size: 13px;
  color: var(--muted);
}
#count {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.screens {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px 24px;
  scroll-margin-top: 24px;
}
.screen {
  padding: 16px 10px 20px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  text-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.screen:hover {
  background: #edf1f6;
  border-color: #d7e0ed;
}
.screen img {
  width: min(100%, 250px);
  height: auto;
  display: block;
  filter: drop-shadow(0 7px 5px rgb(24 34 50 / 0.12));
}
.screen-caption {
  width: min(100%, 250px);
  margin-top: 18px;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.screen-number {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.screen-name {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.screen-category {
  width: min(100%, 250px);
  padding-inline-start: 30px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
  font-weight: 400;
}
.empty {
  padding: 64px 16px;
  text-align: center;
}
.empty p {
  color: var(--muted);
  line-height: 1.5;
}
footer {
  margin-block: 54px 28px;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
footer p:first-child {
  margin-top: 22px;
}
.skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  transform: translateY(-200%);
  padding: 14px;
  background: white;
  z-index: 5;
}
.skip-link:focus {
  transform: none;
}
dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--background);
  color: var(--ink);
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: rgb(11 19 32 / 0.7);
}
body:has(dialog[open]) {
  overflow: hidden;
}
.viewer-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}
.viewer-header > div {
  min-width: 0;
}
.viewer-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.viewer-header button {
  flex-shrink: 0;
}
.viewer-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: 20px 12px;
}
.viewer-stage img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: max(240px, calc(100dvh - 240px));
  object-fit: contain;
}
#image-status:empty {
  display: none;
}
#image-status {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.viewer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.viewer-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 8px;
  text-align: center;
  font-weight: 650;
  font-size: 14px;
}
.keyboard-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  margin: 12px 0 0;
}
.image-error {
  font-size: 13px;
  color: var(--muted);
  padding: 40px 16px;
}
@media (max-width: 1050px) {
  .screens {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .screens {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 10px;
  }
  .filters {
    align-items: stretch;
    flex-direction: column;
  }
  .category-field {
    width: 100%;
  }
}
@media (max-width: 460px) {
  .wrap {
    padding-inline: max(16px, env(safe-area-inset-left));
  }
  .page-header {
    padding-top: 20px;
  }
  .language {
    gap: 6px;
  }
  .language > span {
    display: none;
  }
  .intro {
    margin-block: 30px 24px;
  }
  .screens {
    grid-template-columns: minmax(0, 1fr);
  }
  .screen {
    padding-block: 18px;
  }
  .screen img,
  .screen-caption,
  .screen-category {
    width: min(100%, 300px);
  }
  .filters {
    padding: 16px;
  }
  .results-bar > span {
    display: none;
  }
  dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    padding: 16px;
    border-radius: 16px;
  }
  .viewer-footer button {
    padding: 10px;
    font-size: 13px;
  }
  .viewer-footer a {
    font-size: 13px;
  }
  .keyboard-hint {
    display: none;
  }
  .viewer-stage img {
    max-height: max(220px, calc(100dvh - 210px));
  }
}
@media (prefers-reduced-motion: no-preference) {
  .screen img {
    transition: transform 0.15s ease;
  }
  .screen:hover img {
    transform: translateY(-3px);
  }
}
@media (max-width: 460px) {
  dialog {
    max-width: none;
  }
  .viewer-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 8px;
  }
  .viewer-footer > * {
    min-width: 0;
    overflow-wrap: anywhere;
    justify-content: center;
  }
  .viewer-stage img {
    max-height: max(180px, calc(100dvh - 260px));
  }
}
