/* Catalog refinements: native Rails components in the Coss visual language. */
:root {
  --space-page-top: 36px;
  --space-section: 40px;
  --space-grid-inline: 24px;
  --space-grid-block: 32px;
}

/* 1. Page rhythm and information hierarchy. */
.catalog-intro { padding-block: var(--space-page-top) 28px; }
.catalog-intro h1,
.collections-page > h1,
.favorites-heading h1 { font-size: 36px; letter-spacing: -.6px; }
.collections-page, .favorites-page, .about-page { padding-top: var(--space-page-top); }
.collection-grid { margin-top: 28px; }
.favorites-heading { margin-bottom: 24px; }
.favorites-heading p { margin-top: 8px; }
.box-grid { gap: var(--space-grid-block) var(--space-grid-inline); }
.card-copy h3 { font-size: 18px; }
.card-series, .card-meta { font-size: 11px; }
.card-meta { gap: 12px; }
.breadcrumbs { font-size: 12px; padding-block: 24px; }
.photo-credit { font-size: 11px; }
.related-section { margin-top: var(--space-section); padding-top: 32px; }
.related-heading { justify-content: flex-start; align-items: baseline; gap: 10px; }
.related-heading .count-badge { align-self: center; }
.about-page section p { font-size: 16px; }
.about-page section p + p { margin-top: 16px; }
.about-sources { margin-top: 32px; border-top: 1px solid var(--border); }
.about-sources summary { padding-block: 16px; cursor: pointer; font-size: 13px; font-weight: 500; }
.about-sources .source-list { margin-top: 0; display: grid; gap: 10px; line-height: 1.7; }
.about-sources a { text-decoration: underline; text-underline-offset: 3px; }
.about-rights { margin-top: 16px; color: var(--muted-foreground); font-size: 12px; line-height: 1.6; }

@media (max-width: 640px) {
  :root { --space-page-top: 28px; --space-grid-inline: 14px; --space-grid-block: 28px; }
  .catalog-intro { padding-bottom: 24px; }
  .catalog-intro h1, .collections-page > h1, .favorites-heading h1 { font-size: 32px; letter-spacing: -.4px; }
  .card-copy h3 { font-size: 16px; }
  .card-series, .card-meta { font-size: 11px; }
  .breadcrumbs { font-size: 11px; padding-block: 20px; }
  .related-section { margin-top: 32px; padding-top: 24px; }
  .about-page section p { font-size: 15px; }
}

/* Nucleo's own filled drawing replaces the outline, rather than filling a stroke icon. */
.ui-icon { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.icon-filled, .icon-zoom-out { display: none; }
[aria-pressed="true"] .ui-icon-heart .icon-outline,
.header-favorites:has(.nav-favorites-count:not([hidden])) .icon-outline { display: none; }
[aria-pressed="true"] .ui-icon-heart .icon-filled,
.header-favorites:has(.nav-favorites-count:not([hidden])) .icon-filled { display: inline; }
.pswp--zoomed-in .icon-zoom-in { display: none; }
.pswp--zoomed-in .icon-zoom-out { display: inline; }

/* 2. Coss input groups, native selects, segmented links and a bottom Sheet. */
:root { --control-height: 36px; }
.catalog-toolbar { grid-template-columns: minmax(240px, 1fr) auto auto auto; gap: 12px; }
.filter-fields { display: contents; }
.search-field, .sort-control select { height: var(--control-height); border-radius: var(--radius-md); font-size: 12px; }
.search-field { gap: 10px; padding-inline: 12px; }
.search-field input { font-size: 12px; }
.search-field kbd { font: 10px/18px var(--font-ui); color: var(--muted-foreground); background: var(--secondary); border-color: var(--border); }
.sort-control { position: relative; }
.sort-control select { appearance: none; padding-inline: 12px 32px; background: var(--background); }
.sort-control > .ui-icon { position: absolute; inset-inline-end: 11px; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); pointer-events: none; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--radius-md); color: var(--muted-foreground); background: transparent; flex-shrink: 0; }
.clear-search { width: 26px; height: 26px; }
.mobile-filter-trigger { display: none; }
.view-switch { height: 36px; border-radius: var(--radius-md); padding: 3px; gap: 2px; }
.view-switch a { width: 30px; height: 28px; border-radius: 5px; }
.catalog-meta { min-height: 64px; }
.button { min-height: 36px; border-radius: var(--radius-md); }
.button-primary { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.button-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--muted-foreground); }
.filter-sheet { width: min(100%, 480px); max-width: none; max-height: min(88svh, 680px); padding: 0; margin: auto 0 0 auto; inset: auto 0 0; border: 1px solid var(--border); border-radius: 18px 18px 0 0; background: var(--background); color: var(--foreground); box-shadow: 0 -12px 48px rgb(0 0 0 / .08); }
.filter-sheet::backdrop { background: rgb(0 0 0 / .18); }
.filter-sheet-open { overflow: hidden; }
.sheet-header, .sheet-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; }
.sheet-header { border-bottom: 1px solid var(--border); }
.sheet-header h2 { font: 600 16px/1.3 var(--font-ui); }
.sheet-content { padding: 24px 20px; overflow: auto; overscroll-behavior: contain; max-height: calc(88svh - 154px); }
.sheet-footer { border-top: 1px solid var(--border); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.filter-sheet .filter-fields, .filter-sheet .catalog-filters { display: flex; flex-direction: column; gap: 20px; }
.filter-sheet .sort-control { display: flex; flex-direction: column; gap: 8px; }
.filter-sheet .control-label { position: static; width: auto; height: auto; clip: auto; white-space: normal; margin: 0; font-size: 12px; color: var(--muted-foreground); }
.filter-sheet .sort-control select { width: 100%; max-width: none; height: 40px; font-size: 16px; }
.filter-sheet .sort-control > .ui-icon { top: auto; bottom: 13px; transform: none; }

@media (max-width: 1000px) and (min-width: 641px) {
  .catalog-toolbar { grid-template-columns: minmax(0, 1fr) auto auto; }
  .catalog-toolbar .search-field { grid-column: 1 / -1; max-width: none; }
}
@media (max-width: 640px) {
  .catalog-toolbar { grid-template-columns: 1fr auto; gap: 12px; }
  .catalog-toolbar .search-field { grid-column: 1 / -1; height: 42px; max-width: none; }
  .search-field input { font-size: 16px; }
  .search-field kbd { display: none; }
  .catalog-toolbar > .filter-fields { display: none; }
  .mobile-filter-trigger { display: inline-flex; justify-self: start; gap: 8px; min-height: 36px; padding-inline: 11px; }
  .view-switch { justify-self: end; }
  .catalog-meta { min-height: 64px; }
}
@media (hover: hover) and (pointer: fine) {
  .icon-button:hover, .button-ghost:hover { background: var(--secondary); color: var(--foreground); }
  .button-primary:hover { background: var(--secondary-foreground); color: var(--primary-foreground); }
}

/* 3. Objects lead; Coss ghost actions stay available without permanent button chrome. */
:root { --image-surface: #f8f8f8; }
.card-image-wrap, .detail-main-image { border-color: var(--border); border-radius: var(--radius-lg); background: var(--image-surface); }
.card-image-link { padding: 24px; }
.card-image-link img { transition: none; }
.box-card:hover .card-image-link img { transform: none; }
.box-card .favorite-button, .box-card .zoom-button {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: var(--radius-md); background: transparent; box-shadow: none;
  opacity: 1; transition: opacity .15s ease, background-color .15s ease;
}
.box-card .favorite-button { color: var(--favorite); top: 8px; right: 8px; }
.box-card .favorite-button[aria-pressed="true"] { background: transparent; }
.box-card .zoom-button { color: var(--secondary-foreground); bottom: 8px; right: 8px; }
.box-card .favorite-button .ui-icon, .box-card .zoom-button .ui-icon { width: 18px; height: 18px; }
.image-year { top: 12px; left: 12px; border-color: transparent; background: rgb(255 255 255 / .8); }
.card-image-link:active { background: rgb(0 0 0 / .02); }
.detail-main-image { padding: 32px; }
.thumbnails { gap: 8px; padding-top: 12px; }
.thumbnails button { background: var(--image-surface); border-radius: var(--radius-md); }
.specifications { margin-block: 28px; padding: 4px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.specifications > div { align-items: baseline; grid-template-columns: 112px minmax(0, 1fr); padding-block: 12px; font-size: 13px; gap: 12px; }
.specifications > div + div { border-top: 1px solid var(--border); }
.specifications dt { font-size: 12px; }
.specifications dd.mono { font-size: 12px; }
.specifications dd > .text-link { font-size: 13px; line-height: 1.5; }
.item-tags .tag { min-height: 26px; padding: 3px 8px; border-radius: 6px; font-size: 11px; }
.sources-section { padding-top: 0; border-top: 0; margin-top: 24px; }
.sources-section summary { min-height: 40px; align-items: center; gap: 16px; font-size: 12px; color: var(--secondary-foreground); }
.sources-section summary .ui-icon { transition: transform .15s ease; }
.sources-section[open] summary .ui-icon { transform: rotate(180deg); }
.source-row { padding-block: 12px; line-height: 1.6; }
.source-row + .source-row { border-top: 1px solid var(--border); }
.release-row strong { font-size: 13px; }

/* PhotoSwipe keeps its gestures and focus handling; only its icon/visual layer changes. */
.pswp { --pswp-bg: #f8f8f8; }
.pswp__button { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-md); border-color: var(--border); background: var(--background); color: var(--secondary-foreground); box-shadow: var(--shadow); }
.pswp__button > .ui-icon { position: static; width: 18px; height: 18px; fill: none; transform: none; }
.pswp__button--arrow { position: absolute; }
.pswp__button--arrow > .ui-icon { transform: none; }
.pswp__button:disabled { opacity: .3; }
.pswp__catalog-caption { border-color: var(--border); background: rgb(248 248 248 / .96); border-radius: var(--radius-lg); }
.pswp-original { min-height: 36px; font-size: 11px; }

@media (hover: hover) and (pointer: fine) {
  .box-card .favorite-button, .box-card .zoom-button { opacity: 0; }
  .box-card:hover .favorite-button, .box-card:hover .zoom-button,
  .box-card:focus-within .favorite-button, .box-card:focus-within .zoom-button,
  .box-card .favorite-button[aria-pressed="true"] { opacity: 1; }
  .box-card .favorite-button:hover, .box-card .zoom-button:hover { background: rgb(255 255 255 / .85); }
}
@media (max-width: 640px) {
  .card-image-link { padding: 16px; }
  .box-card .favorite-button, .box-card .zoom-button { opacity: 1; }
  .detail-main-image { padding: 24px; }
  .specifications { padding-inline: 12px; }
  .specifications > div { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
}
@media (hover: none), (any-pointer: coarse) {
  .box-card .favorite-button, .box-card .zoom-button { opacity: 1; }
}

/* 4. Quiet navigation and explicit collection types; broad headings remain tags. */
.site-header-inner { min-height: 88px; }
.collection-card { display: flex; flex-direction: column; }
.collection-image { flex-shrink: 0; }
.collection-card .collection-kind { display: inline-flex; width: fit-content; margin-bottom: 10px; padding: 2px 6px; border: 1px solid var(--border); border-radius: 5px; font: 10px/1.4 var(--font-ui); color: var(--muted-foreground); background: var(--secondary); }
.collection-card .collection-copy { display: flex; flex: 1; flex-direction: column; align-items: flex-start; }
.collection-copy h2 { flex: 1; margin-bottom: 12px; }
.collection-copy > span:last-child { width: 100%; }
.footer-wordmark { font-size: 36px; }
.footer-links a { border-radius: 6px; padding-inline: 8px; margin-inline: -8px; }
.footer-collections a { width: calc(100% + 16px); max-width: none; }
.back-to-top svg { transform: none; }
.pswp-original { display: inline-flex; align-items: center; gap: 7px; }
@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover { background: var(--secondary); text-decoration: none; }
}
@media (max-width: 800px) {
  .site-header-inner { padding-block: 14px; gap: 10px 16px; }
  .site-header .primary-nav a { height: 36px; min-height: 36px; }
}
@media (max-width: 480px) {
  .site-header .wordmark { min-height: 40px; }
  .footer-wordmark { font-size: 32px; }
  .collection-card .collection-kind { font-size: 9px; margin-bottom: 8px; }
  .collection-copy h2 { margin-bottom: 10px; }
}

/* 5. Long captions, small viewports and content extremes. */
.card-image-link { grid-template: minmax(0, 1fr) / minmax(0, 1fr); }
.card-image-link img { min-width: 0; min-height: 0; }
.collection-image { background: var(--image-surface); }
.collection-image .missing-image { height: 100%; }
.card-copy h3, .detail-info h1, .collection-card h2, .breadcrumbs > span { overflow-wrap: anywhere; }
.pswp__catalog-caption { max-height: 35svh; overflow: auto; overscroll-behavior: contain; }
@media (max-width: 640px) {
  .pswp__button--arrow { bottom: calc(36px + var(--caption-height, 60px)); }
}

/* 6. One frame per photograph. Browse frames are square; photographs close to that
   shape fill them (see photo_fit_class), others are shown whole. Item pages never crop. */
.card-image-wrap { aspect-ratio: 1; border: 0; }
.card-image-wrap::after, .collection-image::after, .detail-main-image::after, .thumbnails button::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06);
}
.card-image-link { padding: 0; }
.fit-cover img { object-fit: cover; width: 100%; height: 100%; }
/* Other shapes sit whole on the mat, rounded like the frame so they read as mounted. */
.card-image-link.fit-contain, .collection-image.fit-contain { padding: 16px; }
.fit-contain img { width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: var(--radius-md); }
/* Card actions now sit on photographs, so they get a small frosted chip. */
.box-card .card-image-wrap :is(.favorite-button, .zoom-button),
.box-card .card-image-wrap .favorite-button[aria-pressed="true"] { width: 32px; height: 32px; border-radius: 999px; background: rgb(255 255 255 / .92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.box-card .card-image-wrap .favorite-button { top: 10px; right: 10px; }
.box-card .card-image-wrap .zoom-button { bottom: 10px; right: 10px; }
.card-image-wrap .image-year { top: 10px; left: 10px; line-height: 22px; padding-inline: 7px; border-radius: 999px; background: rgb(255 255 255 / .92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--secondary-foreground); }
.card-copy { padding-top: 12px; }
.card-copy h3 { margin: 0; }
.card-meta { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0; margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.card-meta > span + span::before { content: "·"; margin-inline: 6px; color: rgb(0 0 0 / .28); }
.list-view .card-image-wrap { aspect-ratio: 1; }
.box-grid.list-view { gap: 0; }
.list-view .card-meta { gap: 0; }
.list-view .card-image-link.fit-contain { padding: 6px; }
.list-view .fit-contain img { border-radius: 4px; }

.collection-card { border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.collection-image { position: relative; height: auto; aspect-ratio: 1; padding: 0; border-radius: var(--radius-lg); overflow: hidden; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
.collection-image img { min-width: 0; min-height: 0; }
.collection-card > .collection-copy:last-child { padding: 12px 0 0; }
.collection-copy h2 { flex: 0 0 auto; margin: 0; }
.collection-card .card-meta, .collection-card .card-meta > span { display: flex; justify-content: flex-start; width: auto; margin: 0; font-size: 12px; color: var(--muted-foreground); }
.collection-card .card-meta { margin-top: 4px; }
.collection-card .card-meta .collection-kind { display: inline; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; }

.detail-main-image { padding: 24px; border: 0; overflow: hidden; }
.detail-main-image img { width: auto; height: auto; max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; border-radius: var(--radius-md); }
.thumbnails button { position: relative; display: grid; place-items: center; width: 64px; height: 64px; padding: 0; border: 0; overflow: hidden; }
.thumbnails button.fit-contain { padding: 4px; }
.thumbnails .fit-contain img { width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 4px; }
.specifications { margin-block: 24px; padding: 0; border: 0; border-radius: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.specifications > div { padding-block: 11px; }
.sources-section { margin-top: 12px; }

@media (hover: hover) and (pointer: fine) {
  .collection-card:hover { border-color: transparent; }
  .collection-card:hover h2, .box-card:hover h3 a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgb(0 0 0 / .3); }
  .box-card .card-image-wrap :is(.favorite-button, .zoom-button):hover { background: #fff; }
  .thumbnails button:hover::after { box-shadow: inset 0 0 0 1px rgb(0 0 0 / .3); }
}
@media (max-width: 900px) and (min-width: 641px) {
  .box-grid:not(.list-view), .collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .card-copy { padding-top: 10px; }
  .card-image-link.fit-contain, .collection-image.fit-contain { padding: 10px; }
  .card-meta, .collection-card .card-meta, .collection-card .card-meta > span { font-size: 11px; }
  .card-meta > span + span::before { margin-inline: 4px; }
  .specifications { padding: 0; }
  .thumbnails { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin-inline: -20px; padding-inline: 20px; scroll-padding-inline: 20px; }
  .thumbnails::-webkit-scrollbar { display: none; }
  .thumbnails button { flex: 0 0 auto; scroll-snap-align: start; }
  .detail-main-image { padding: 16px; }
  .fit-contain img, .detail-main-image img { border-radius: 6px; }
}

/* 7. Mobbin browse structure: a list toolbar with visible search, sort tabs and an inline
   filter panel (Dribbble), and soft surfaces that hold each photograph whole. */
:root { --image-surface: #f4f4f4; --radius-surface: 20px; }


.catalog-intro { padding-bottom: 20px; }
.browse-bar { display: flex; align-items: center; gap: 20px; min-height: 44px; padding-block: 4px 28px; }
.browse-bar .view-switch { height: 40px; padding: 4px; gap: 2px; border: 0; border-radius: 999px; background: var(--secondary); }
.browse-bar .view-switch a { width: 36px; height: 32px; border-radius: 999px; color: var(--muted-foreground); }
.browse-bar .view-switch a.selected { color: var(--foreground); background: var(--background); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 0 0 1px rgb(0 0 0 / .04); }
.browse-count { margin-left: auto; font-size: 13px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Toolbar: view and sort on the left; count, Search and Filter on the right. Search is a
   real button that opens into a field. The field may shrink but never pushes Filter out. */
.browse-bar { flex-wrap: nowrap; min-width: 0; }
.browse-bar .view-switch, .sort-select, .filter-toggle { flex: none; }
.sort-select { position: relative; display: inline-flex; align-items: center; }
.sort-select select { appearance: none; field-sizing: content; height: 40px; padding: 0 34px 0 16px; border: 1px solid var(--input); border-radius: 999px; background: var(--background); color: var(--foreground); font: 500 13px/1 var(--font-ui); cursor: pointer; }
.sort-select > .ui-icon { position: absolute; right: 14px; color: var(--muted-foreground); pointer-events: none; }
.browse-count { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.browse-search { position: relative; display: flex; align-items: center; flex: none; min-width: 0; width: fit-content; height: 40px; border: 1px solid var(--input); border-radius: 999px; background: var(--background); overflow: hidden; interpolate-size: allow-keywords; transition: width var(--motion-enter) var(--motion-ease), background-color var(--motion-feedback) ease, border-color var(--motion-feedback) ease; }
.browse-search.is-open { flex: 0 1 auto; width: 340px; min-width: 140px; border-color: transparent; background: var(--secondary); }
.search-toggle { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 38px; padding: 0 16px 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--foreground); font: 500 13px/1 var(--font-ui); transition: transform var(--motion-feedback) var(--motion-ease); }
.search-toggle:active { transform: scale(var(--motion-press-scale)); transition-duration: var(--motion-press); }
.search-toggle .ui-icon { color: var(--secondary-foreground); }
.browse-search.is-open .search-toggle { padding: 0 8px 0 14px; }
.browse-search.is-open .search-toggle-label { display: none; }
.browse-search input { display: none; flex: 1; min-width: 0; height: 100%; padding: 0 4px 0 0; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--foreground); }
.browse-search.is-open input { display: block; }
.browse-search input::-webkit-search-cancel-button { display: none; }
.browse-search input::placeholder { color: var(--muted-foreground); }
.browse-search.is-open:focus-within { background: var(--background); border-color: var(--ring); }
.browse-search .clear-search { flex: none; width: 28px; height: 28px; margin-right: 6px; border-radius: 999px; }
.filter-toggle { gap: 8px; min-height: 40px; padding-inline: 16px; border-radius: 999px; font-size: 13px; box-shadow: none; }
.filter-toggle[aria-expanded="true"] { background: var(--secondary); border-color: transparent; }
.filter-toggle .count-badge { min-width: 20px; height: 20px; border-radius: 999px; }

.catalog-toolbar.filter-panel { display: block; padding: 0 0 28px; }
.catalog-toolbar.filter-panel[hidden] { display: none; }
.filter-panel .filter-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; max-width: 760px; }
.filter-field { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.filter-panel .control-label, .filter-sheet .control-label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; font: 500 12px/1.4 var(--font-ui); color: var(--secondary-foreground); }
.filter-panel .search-field, .filter-panel .sort-control select, .filter-sheet .search-field { width: 100%; max-width: none; height: 40px; border-radius: 10px; font-size: 13px; }
.filter-panel .search-field input { font-size: 13px; }
.filter-panel .sort-control > .ui-icon { top: auto; bottom: 13px; transform: none; }
.filter-sheet .search-field input { font-size: 16px; }

.box-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.card-image-wrap, .collection-image, .detail-main-image { border-radius: var(--radius-surface); background: var(--image-surface); }
.card-image-wrap::after, .collection-image::after, .detail-main-image::after { box-shadow: none; }
.card-image-link, .card-image-link.fit-contain, .collection-image, .collection-image.fit-contain { padding: 12%; }
.card-image-link img, .collection-image img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.card-image-wrap .image-year { top: 14px; left: 14px; padding-inline: 8px; line-height: 22px; border-radius: 6px; background: rgb(0 0 0 / .32); color: #fff; font-weight: 500; -webkit-backdrop-filter: none; backdrop-filter: none; }
.box-card .card-image-wrap .favorite-button { top: 12px; right: 12px; }
.box-card .card-image-wrap .zoom-button { bottom: 12px; right: 12px; }
.card-copy { padding-top: 14px; }
.box-grid:not(.list-view) .card-copy h3 { font-size: 19px; }
.collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.collection-card > .collection-copy:last-child { padding-top: 14px; }
.list-view .card-image-wrap { border-radius: 12px; }
.list-view .card-image-link, .list-view .card-image-link.fit-contain { padding: 10px; }
.list-view .card-image-link img { border-radius: 4px; }
.thumbnails button { border-radius: 10px; }

@media (hover: hover) and (pointer: fine) {
  .browse-search:not(.is-open):hover, .sort-select select:hover { background: var(--secondary); }
  .box-card:hover .card-image-wrap, .collection-card:hover .collection-image { background: #efefef; box-shadow: none; }
}
@media (max-width: 900px) {
  .browse-count { display: none; }
  .browse-search { margin-left: auto; }
}
@media (max-width: 640px) {
  :root { --radius-surface: 14px; }
  .catalog-results { padding-top: 12px; }
  .browse-bar { gap: 8px; padding-bottom: 20px; }
  .browse-search { margin-left: auto; }
  .search-toggle { padding: 0 11px; }
  .search-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .browse-search.is-open { flex: 1 1 auto; width: auto; }
  .browse-bar:has(.browse-search.is-open) :is(.view-switch, .sort-select) { display: none; }
  .browse-search input { font-size: 16px; }
  .sort-select select { padding-inline: 14px 30px; }
  .sort-select > .ui-icon { right: 11px; }
  .filter-toggle { padding-inline: 12px; }
  .catalog-toolbar.filter-panel { display: none; }
  .box-grid:not(.list-view), .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .card-image-link, .card-image-link.fit-contain, .collection-image, .collection-image.fit-contain { padding: 10%; }
  .card-image-link img, .collection-image img { border-radius: 6px; }
  .card-image-wrap .image-year { top: 8px; left: 8px; padding-inline: 6px; line-height: 20px; font-size: 10px; }
  .box-card .card-image-wrap .favorite-button { top: 6px; right: 6px; }
  .box-card .card-image-wrap .zoom-button { bottom: 6px; right: 6px; }
}
@media (max-width: 380px) {
  .filter-toggle { padding-inline: 11px; }
  .filter-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .browse-bar { gap: 6px; }
}
@media (max-width: 360px) {
  .collection-grid { grid-template-columns: 1fr; }
}
