.gallery-page-body { background: var(--theme-page, #f1f2f5); color: var(--theme-text, #171717); }
.gallery-page { width: min(1628px, calc(100% - 56px)); margin: 0 auto; padding: 42px 0 80px; }
.gallery-page-heading { margin: 0 0 26px 282px; text-align: left; }
.gallery-page-heading h1 { margin: 0; font-size: clamp(1.65rem, 2.7vw, 2.35rem); line-height: 1.1; }
.gallery-page-context { margin: 8px 0 0; color: var(--theme-link); font-size: 1rem; font-weight: 700; line-height: 1.35; }
.gallery-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; }
.gallery-sidebar { display: grid; gap: 22px; padding: 18px 16px; border-radius: 14px; background: color-mix(in srgb, var(--theme-surface, #fff) 62%, transparent); }
.gallery-sidebar-group { display: grid; gap: 7px; padding: 0 0 19px; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--theme-border, #cfd2d7) 70%, transparent); background: transparent; }
.gallery-sidebar-group:last-child { padding-bottom: 0; border-bottom: 0; }
.gallery-sidebar-group h2 { margin: 0 0 4px; color: var(--theme-accent, #1f70e5); font-size: .82rem; font-weight: 800; letter-spacing: .025em; line-height: 1.15; text-transform: uppercase; }
.gallery-sidebar-group p { margin: 10px 0 0; color: var(--muted-text, #5d6169); font-size: .86rem; line-height: 1.4; }
.gallery-sidebar label { color: var(--theme-muted, #5d6169); font-size: .88rem; font-weight: 600; line-height: 1.2; }
.gallery-sidebar select, .gallery-direct-lookup input { box-sizing: border-box; width: 100%; min-height: 38px; border: 1px solid var(--theme-border, #cfd2d7); border-radius: 7px; background: var(--theme-surface, #fff); color: inherit; font: inherit; font-size: .92rem; line-height: 1.2; padding: 7px 10px; }
.gallery-sidebar select:focus-visible, .gallery-direct-lookup input:focus-visible, .gallery-discovery-link:focus-visible, .gallery-sidebar button:focus-visible { outline: 3px solid color-mix(in srgb, var(--theme-accent, #1f70e5) 55%, transparent); outline-offset: 2px; }
.gallery-discovery-link { border: 0; border-radius: 5px; padding: 3px 4px; background: transparent; color: var(--theme-muted, #5d6169); font: inherit; font-size: .92rem; font-weight: 650; line-height: 1.25; text-align: left; cursor: pointer; }
.gallery-discovery-link:hover, .gallery-discovery-link:focus-visible, .gallery-discovery-link[aria-current="true"] { background: color-mix(in srgb, var(--theme-accent, #1f70e5) 9%, transparent); color: var(--theme-accent, #1f70e5); outline: none; }
.gallery-direct-lookup { display: grid; gap: 7px; }
.gallery-sidebar .gallery-clear-context { min-height: 30px; border: 1px solid var(--theme-border, #cfd2d7); border-radius: 6px; background: transparent; color: inherit; font: 600 .86rem/1 Arial, Helvetica, sans-serif; cursor: pointer; }
.gallery-sidebar .gallery-clear-context:hover { border-color: var(--theme-accent, #1f70e5); color: var(--theme-accent, #1f70e5); }
.gallery-direct-lookup .ui-button { min-height: 38px; border-radius: 7px; font-weight: 700; }
.gallery-card { min-width: 0; padding: 22px; border: 0; border-radius: 14px; background: var(--theme-surface, #fff); box-shadow: none; }
.gallery-main-column { min-width: 0; }
.gallery-below-content { display: grid; justify-items: start; gap: 42px; margin: 82px 0 0; padding: 0 22px; background: transparent; }
.gallery-below-content__lookup, .gallery-below-content__surprise { display: grid; justify-items: start; align-content: start; gap: 6px; }
.gallery-below-content h2 { margin: 0; color: var(--theme-text, #171717); font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
.gallery-below-content p { margin: 0; color: var(--theme-accent, #1f70e5); font-size: .93rem; font-weight: 650; }
.gallery-below-content .gallery-direct-lookup { position: relative; display: block; width: 256px; margin-top: 8px; }
.gallery-below-content .gallery-direct-lookup input { box-sizing: border-box; min-height: 42px; width: 100%; border: 1px solid var(--theme-border, #aeb3bb); border-radius: 999px; background: var(--theme-surface, #fff); color: inherit; font: inherit; font-size: .95rem; padding: 8px 47px 8px 17px; }
.gallery-lookup-submit { position: absolute; top: 0; right: 0; width: 42px; min-height: 42px; border: 0; border-inline-start: 1px solid var(--theme-border, #cfd2d7); border-radius: 0 999px 999px 0; background: transparent; color: var(--theme-muted, #5d6169); cursor: pointer; font: 700 1.6rem/1 Arial, Helvetica, sans-serif; }
.gallery-below-content__surprise .ui-button { min-height: 52px; min-width: 234px; border-radius: 18px; font-size: 1.2rem; font-weight: 600; }
.gallery-status { min-height: 1.4em; margin-bottom: 14px; color: var(--muted-text, #5d6169); font-size: .9rem; }
.gallery-active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 12px; }
.gallery-filter-chip { border: 1px solid var(--theme-border, #cfd2d7); border-radius: 999px; background: transparent; color: inherit; cursor: pointer; font: 600 .78rem/1.2 Arial, Helvetica, sans-serif; padding: 5px 8px; }
.gallery-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; }
.gallery-tile { aspect-ratio: 1; min-width: 0; overflow: hidden; border: 0; border-radius: 0; padding: 0; background: #d9dde3; cursor: pointer; }
.gallery-tile:focus-visible { outline: 3px solid var(--accent, #1b72e8); outline-offset: 2px; }
.gallery-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr); align-items: center; gap: 10px; margin-top: 18px; padding: 12px 0; border-top: 1px solid color-mix(in srgb, var(--theme-border, #cfd2d7) 65%, transparent); }
.gallery-controls-group { display: contents; }
.gallery-controls button { min-height: 36px; border-radius: 7px; font-size: .9rem; font-weight: 700; }
#gallery-back { grid-column: 1; justify-self: start; }
#gallery-load-less { grid-column: 2; }
#gallery-load-more { grid-column: 3; }
#gallery-next { grid-column: 4; justify-self: end; }
.gallery-controls button[disabled] { cursor: not-allowed; opacity: .62; filter: saturate(.45); }
html[data-theme="dark"] .gallery-page-body { background: var(--theme-page); color: var(--theme-text); }
html[data-theme="dark"] .gallery-sidebar-group p, html[data-theme="dark"] .gallery-status { color: var(--theme-muted); }
html[data-theme="dark"] .gallery-sidebar, html[data-theme="dark"] .gallery-card { background: var(--theme-surface); }
html[data-theme="dark"] .gallery-sidebar-group, html[data-theme="dark"] .gallery-controls { border-color: var(--theme-border); }
html[data-theme="dark"] .gallery-below-content .gallery-direct-lookup input, html[data-theme="dark"] .gallery-sidebar select, html[data-theme="dark"] .gallery-direct-lookup input { border-color: var(--theme-border); background: var(--theme-control); }
html[data-theme="dark"] .gallery-lookup-submit { border-color: var(--theme-border); }
html[data-theme="dark"] .gallery-sidebar .gallery-clear-context { border-color: var(--theme-border); color: var(--theme-text); }
html[data-theme="dark"] .gallery-page-context, html[data-theme="dark"] .gallery-sidebar-group h2, html[data-theme="dark"] .gallery-below-content p, html[data-theme="dark"] .gallery-discovery-link:hover, html[data-theme="dark"] .gallery-discovery-link:focus-visible, html[data-theme="dark"] .gallery-discovery-link[aria-current="true"], html[data-theme="dark"] .gallery-discovery-link[aria-pressed="true"] { color: var(--theme-link); }
html[data-theme="dark"] .gallery-discovery-link:hover, html[data-theme="dark"] .gallery-discovery-link:focus-visible, html[data-theme="dark"] .gallery-discovery-link[aria-current="true"], html[data-theme="dark"] .gallery-discovery-link[aria-pressed="true"] { background: color-mix(in srgb, var(--theme-link) 9%, transparent); }
html[data-theme="dark"] .gallery-sidebar select:focus-visible, html[data-theme="dark"] .gallery-direct-lookup input:focus-visible, html[data-theme="dark"] .gallery-sidebar button:focus-visible { outline-color: var(--theme-focus); }
html[data-theme="dark"] .gallery-direct-lookup input::placeholder { color: var(--theme-muted); opacity: 1; }
@media (max-width: 1259px) { .gallery-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (max-width: 850px) { .gallery-page { width: min(100% - 28px, 720px); padding-block: 30px; } .gallery-page-heading { margin-inline-start: 0; } .gallery-layout { grid-template-columns: 1fr; } .gallery-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gallery-sidebar-group { border-bottom: 0; padding-bottom: 0; } .gallery-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 520px) { .gallery-sidebar { grid-template-columns: 1fr; } .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .gallery-controls { grid-template-columns: 1fr 1fr; } #gallery-back { grid-column: 1; } #gallery-load-less { grid-column: 1; } #gallery-load-more { grid-column: 2; } #gallery-next { grid-column: 2; } }
