@font-face { font-family: Areal; src: url('/fonts/ABCAreal-Regular.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
* { box-sizing: border-box; }
:root {
  color-scheme: light;
  --page-background: #fff;
  --text-color: #000;
  --muted-color: #666;
  --disabled-color: #999;
  --placeholder-color: #757575;
  --border-color: #d9d9d9;
  --surface-background: #f2f2f2;
  font-family: Areal, Arial, Helvetica, sans-serif; color: var(--text-color); background: var(--page-background); font-synthesis: none; font-size: 16px; line-height: 1.4;
}
@media (prefers-color-scheme: dark) {
  :root { --placeholder-color: var(--muted-color); }
  /* Dim the complete white page, including images, without blocking interaction. */
  :root::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 15%);
    pointer-events: none;
    z-index: 10;
  }
}
body { width: 100%; max-width: 1504px; margin: 0 auto; padding: 0 clamp(24px, 7.5vw, 112px); min-height: 100svh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; border-radius: 0; cursor: pointer; padding: 0; }
button { min-height: 44px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 1px solid var(--text-color); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -80px; left: 24px; background: var(--page-background); padding: 12px; z-index: 5; }
.skip-link:focus { top: 6px; }
.site-header { position: sticky; top: 0; z-index: 3; background: var(--page-background); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; min-height: 72px; }
#randomize { grid-column: 2; }
#randomize:disabled { color: var(--disabled-color); cursor: default; }
.header-actions { justify-self: end; }
.header-actions button { color: var(--muted-color); }
.search-panel { position: relative; z-index: 2; background: var(--page-background); padding: 24px 0 16px; }
.search-panel input { border: 0; border-bottom: 1px solid var(--text-color); border-radius: 0; background: var(--page-background); width: 100%; padding: 8px 0 16px; font-size: clamp(22px, 3vw, 36px); appearance: none; }
.search-panel input::placeholder { color: var(--placeholder-color); }
.search-panel input::-webkit-search-cancel-button { filter: grayscale(1); }
.search-meta { display: flex; justify-content: space-between; align-items: center; gap: 20px; color: var(--muted-color); font-size: 13px; margin-top: 8px; }
.search-field { position: relative; }
.search-suggestions { position: absolute; top: 100%; inset-inline: 0; z-index: 4; margin: 0; padding: 8px 0; list-style: none; background: var(--page-background); border: 1px solid var(--border-color); max-height: min(360px, 45svh); overflow-y: auto; overscroll-behavior: contain; }
.search-suggestions li { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 10px 16px; cursor: pointer; font-size: 16px; }
.search-suggestions li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.search-suggestions li[aria-selected='true'] { background: var(--surface-background); }
.suggestion-kind { flex-shrink: 0; color: var(--muted-color); font-size: 12px; }
.selected-tags, .tag-options { display: flex; flex-wrap: wrap; gap: 8px; }
.selected-tags { margin-top: 16px; }
.selected-tags button, .tag-options button { display: inline-flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--border-color); font-size: 13px; text-align: left; overflow-wrap: anywhere; max-width: 100%; }
.selected-tags button { border-color: var(--text-color); }
.selected-tags button[data-kind='exclude'] { border-style: dashed; }
.tag-option { display: inline-flex; max-width: 100%; border: 1px solid var(--border-color); }
.tag-option button { border: 0; }
.tag-option button[data-kind='exclude'] { border-left: 1px solid var(--border-color); flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; justify-content: center; font-size: 22px; line-height: 1; }
.tag-option button:hover { background: var(--surface-background); }
.tag-option button[data-kind='exclude']:hover, .tag-option button[data-kind='exclude']:focus-visible { background: var(--text-color); color: var(--page-background); }
.tag-count, .tag-remove { color: var(--muted-color); font-size: 12px; }
.tag-browser { margin-top: 8px; font-size: 13px; }
.tag-browser summary { width: fit-content; min-height: 44px; display: flex; align-items: center; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; list-style: none; }
.tag-browser summary::-webkit-details-marker { display: none; }
.tag-browser summary:focus-visible { outline: 1px solid var(--text-color); outline-offset: 4px; }
.tag-help { color: var(--muted-color); margin: 0 0 12px; }
.tag-options { max-height: 224px; overflow-y: auto; padding: 4px; margin: -4px; }
.tag-options button:hover { border-color: var(--text-color); }
@media (hover: hover) and (pointer: fine) { .search-suggestions li:hover { background: var(--surface-background); } }
main { flex: 1; min-width: 0; padding-top: 28px; }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.item { min-width: 0; }
.item-link { display: flex; flex-direction: column; height: 100%; }
.item-media { position: relative; width: min(100%, 280px); aspect-ratio: 1; margin-inline: auto; background: #fff; overflow: hidden; }
.item-media img { position: absolute; width: 100%; height: 100%; object-fit: contain; inset: 0; display: block; }
/* Preserve photo colors and the readability of transparent artwork in both themes. */
.item-media img, .gallery-slide > img, .gallery-thumbnails img { background: #fff; color: #000; }
.item-typographic { display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--surface-background); }
.item-typographic span { font-size: clamp(20px, 2.5vw, 38px); line-height: 1.12; letter-spacing: -.04em; text-align: center; overflow-wrap: anywhere; }
.item-caption { padding-top: 10px; text-align: center; }
.item h2 { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 400; overflow-wrap: anywhere; }
.owned-tag { display: inline-block; margin-top: 6px; padding: 2px 7px; border: 1px solid var(--border-color); color: var(--muted-color); font-size: 12px; line-height: 1.4; white-space: nowrap; }
.empty-state { padding: 20vh 16px; text-align: center; }
.empty-state h2 { font-size: clamp(26px, 4vw, 48px); font-weight: 400; letter-spacing: -.045em; margin: 0; }
.empty-state p { color: var(--muted-color); margin: 18px 0; }
.empty-state button { text-decoration: underline; text-underline-offset: 5px; }
footer { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px; margin-top: 32px; padding: 24px 0; color: var(--muted-color); font-size: 13px; }
footer .byline { margin-left: auto; text-align: right; }
footer a { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 1099px) { body { padding: 0 32px; } .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; } }
@media (max-width: 767px) {
  body { padding: 0 16px; }
  .site-header { gap: 16px; min-height: 56px; }
  main { padding-top: 16px; }
  .collection-grid { gap: 32px 16px; }
  .item-typographic { padding: 16px; }
}
@media (hover: hover) and (pointer: fine) { .item-link:hover { opacity: .8; } button:hover { color: var(--text-color); } }
@media (prefers-reduced-motion: no-preference) { .item-link { transition: opacity 180ms ease; } }

/* Item pages share the collection's type, colors, and outer margins. */
.detail-header { display: flex; align-items: center; min-height: 72px; }
.detail-header a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted-color); }
.item-page main { padding-top: 40px; }
.item-detail { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); grid-template-rows: auto 1fr; grid-template-areas: 'heading gallery' 'info gallery'; gap: 24px clamp(40px, 6vw, 96px); align-items: start; }
.item-heading { grid-area: heading; margin: 32px 0 0; font-size: 26px; line-height: 1.25; font-weight: 400; overflow-wrap: anywhere; }
.item-heading h1 { margin: 0; font: inherit; }
.item-info { grid-area: info; max-width: 34ch; }
.item-description { margin: 0 0 24px; line-height: 1.65; white-space: pre-line; }
.source-link { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 5px; }
.item-gallery { grid-area: gallery; width: 100%; max-width: min(620px, max(360px, calc(100svh - 334px))); margin-left: auto; min-width: 0; }
.gallery-stage { touch-action: pan-y pinch-zoom; }
.gallery-slide { margin: 0 0 24px; }
.gallery-slide > img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; height: auto; }
.gallery-slide figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; min-height: 42px; margin-top: 16px; color: var(--muted-color); font-size: 13px; }
.gallery-slide figcaption a { flex-shrink: 0; text-decoration: underline; text-underline-offset: 3px; }
.gallery-controls { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; color: var(--muted-color); }
.gallery-controls button[aria-disabled='true'] { color: var(--disabled-color); cursor: default; }
.gallery-thumbnails { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.gallery-thumbnails button { width: 64px; height: 64px; padding: 4px; border: 1px solid transparent; }
.gallery-thumbnails button[aria-pressed='true'] { border-color: var(--text-color); }
.gallery-thumbnails img { display: block; width: 100%; height: 100%; object-fit: contain; }
.image-credit { margin: 24px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted-color); }
@media (max-width: 767px) {
  .detail-header { min-height: 56px; }
  .item-page main { padding-top: 16px; }
  .item-detail { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: 'heading' 'gallery' 'info'; gap: 24px; }
  .item-gallery { max-width: none; }
  .item-info { max-width: 40ch; }
  .item-heading { margin-top: 0; font-size: 23px; }
  .gallery-slide { margin-bottom: 8px; }
  .gallery-thumbnails { gap: 8px; }
  .gallery-thumbnails button { width: 48px; height: 48px; }
}
