:root { color-scheme: light; --bg: #f6f7f3; --paper: #fff; --ink: #24382c; --muted: #5e6c60; --line: #dce3d7; --soft: #eaf0e3; --green: #294b34; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, .gallery-items:focus-visible { outline: 3px solid #8cab7a; outline-offset: 3px; }
.gallery-header { display: flex; align-items: center; gap: 20px; min-height: 52px; padding: 7px max(24px, calc((100vw - 1240px) / 2)); background: var(--paper); border-bottom: 1px solid var(--line); }
.gallery-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 14px; font-weight: 600; letter-spacing: -.4px; white-space: nowrap; }
.gallery-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--green); color: #fff; font-size: 21px; }
.gallery-search { display: flex; align-items: stretch; gap: 8px; flex: 1; max-width: 440px; margin-left: auto; }
.gallery-search input { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 7px; padding: 8px 11px; font-size: 14px; background: var(--bg); }
.gallery-search button, .category-picker button { border: 1px solid var(--line); border-radius: 7px; padding: 8px 11px; font-size: 13px; background: var(--paper); }
.gallery-search button:hover, .category-picker button:hover { background: var(--soft); }
.account-link { font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap; }
main { max-width: 1288px; margin: auto; padding: 12px 24px 0; }
h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.4px; line-height: 1.2; flex-shrink: 0; }
.browse-bar { display: flex; align-items: center; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; min-width: 0; }
.category-links { display: flex; flex: 1; align-items: center; gap: 7px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.category-links a { flex-shrink: 0; padding: 7px 13px; font-size: 13px; border-radius: 20px; text-decoration: none; color: var(--muted); white-space: nowrap; }
.category-links a:hover { background: var(--soft); }
.category-links a[aria-current=page] { background: var(--green); color: #fff; }
.category-picker { display: flex; gap: 6px; align-items: center; margin-left: auto; flex-shrink: 0; }
.category-picker select { max-width: 160px; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; background: var(--paper); font-size: 13px; }
.category-picker button { padding: 7px 9px; }
.gallery-query { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.gallery-query p { margin: 0; overflow-wrap: anywhere; }
.gallery-query a { flex-shrink: 0; }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; min-height: 36px; }
.gallery-toolbar p { margin: 0; font-size: 13px; font-weight: 600; }
.gallery-toolbar p span { font-weight: 400; color: var(--muted); }
.gallery-arrows { display: flex; gap: 8px; }
.gallery-arrows button { width: 38px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 20px; line-height: 1; }
.gallery-arrows button:hover:enabled { background: var(--soft); }
.gallery-arrows button:disabled { opacity: .35; cursor: default; }
.gallery-items { display: flex; gap: 20px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: auto; scrollbar-color: #a4b49c var(--soft); padding: 0 0 16px; margin-bottom: 18px; }
.gallery-items::-webkit-scrollbar { height: 8px; }
.gallery-items::-webkit-scrollbar-track { background: var(--soft); border-radius: 8px; }
.gallery-items::-webkit-scrollbar-thumb { background: #a4b49c; border-radius: 8px; }
.gallery-item { flex: 0 0 clamp(270px, 30vw, 370px); min-width: 0; scroll-snap-align: start; }
.gallery-image-link { display: block; position: relative; border-radius: 10px; overflow: hidden; background: var(--soft); text-decoration: none; height: var(--gallery-image-height, clamp(100px, calc(100dvh - 420px), 440px)); }
.gallery-image-link img { display: block; width: 100%; height: 100%; object-fit: contain; }
.image-category { position: absolute; bottom: 10px; left: 10px; padding: 3px 8px; border-radius: 5px; color: #fff; background: #1c2b20b8; font-size: 11px; }
.gallery-item h2 { margin: 10px 0 6px; min-height: 39.2px; font-size: 14px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.gallery-item h2 a { text-decoration: none; }
.gallery-item h2 a:hover { text-decoration: underline; }
.gallery-item-meta { display: flex; align-items: start; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.gallery-item-meta > span { overflow-wrap: anywhere; min-width: 0; }
.open-editor { color: var(--green); text-decoration: none; white-space: nowrap; }
.open-editor:hover { text-decoration: underline; }
.image-unavailable { display: grid; place-content: center; height: 100%; text-align: center; padding: 20px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.image-unavailable > span { font-size: 12px; }
.gallery-image-link.has-error .image-category { display: none; }
.gallery-empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.gallery-empty h2 { margin: 0 0 10px; color: var(--ink); font-size: 23px; font-weight: 500; }
.gallery-empty p { max-width: 470px; margin: 0 auto 18px; font-size: 14px; }
.gallery-empty a { color: var(--green); font-size: 14px; }
.gallery-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
.gallery-enhanced .category-picker button { display: none; }
@media (max-width: 1000px) { .gallery-header { gap: 18px; } }
@media (max-width: 650px) {
  .gallery-header { flex-wrap: wrap; gap: 8px; padding: 8px 16px; }
  .gallery-brand { flex: 1; }
  .gallery-search { order: 1; flex-basis: 100%; max-width: none; margin-left: 0; }
  main { padding: 12px 16px 0; }
    .browse-bar h1 { font-size: 16px; }
  .browse-bar { gap: 8px; margin-bottom: 10px; padding-bottom: 10px; }
  .category-links { flex: 1; }
  .category-picker { margin-left: 0; }
  .category-picker select { max-width: 110px; }
  .gallery-items { gap: 14px; }
  .gallery-item { flex-basis: min(82vw, 340px); }
  .image-category { left: 7px; bottom: 7px; font-size: 11px; max-width: calc(100% - 14px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (pointer: coarse) { button, .category-links a, .open-editor, .gallery-arrows button { min-height: 44px; } .category-links a { display: inline-flex; align-items: center; } input[type=search], select { font-size: 16px; } .open-editor { display: flex; align-items: center; } }
