:root {
  color-scheme: light;
  --ink: #18251d;
  --muted: #5e6a61;
  --green: #55a51c;
  --line: #dfe6dc;
  --surface: #f5f7f4;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fff; font: 16px/1.5 Arial, Helvetica, sans-serif; }
.topline { height: 7px; background: var(--green); }
.wrap { width: min(100% - 48px, 1480px); margin: 0 auto; }
.site-header, .album-header { padding: 46px 0 34px; border-bottom: 1px solid var(--line); }
.album-header { padding-bottom: 32px; }
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: -.035em; line-height: 1.12; }
h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: clamp(25px, 3vw, 34px); }
.lede { margin: 12px 0 0; color: var(--muted); }
.page-space { min-height: 54vh; padding-top: 28px; padding-bottom: 64px; }
.directory-heading, .album-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.search-label input { width: min(100%, 340px); padding: 11px 13px; border: 1px solid #b9c5b5; border-radius: 4px; color: var(--ink); font: inherit; }
.search-label input:focus-visible, .back-link:focus-visible, .card-link:focus-visible, button:focus-visible { outline: 3px solid #8bc668; outline-offset: 2px; }
.result-count { margin: 16px 0 18px; color: var(--muted); font-size: 14px; }
.gallery-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.card-link { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; color: inherit; background: #fff; text-decoration: none; transition: box-shadow .2s ease, transform .2s ease; }
.card-link:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgb(20 40 20 / .1); }
.card-cover { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface); }
.card-copy { padding: 15px 16px 17px; }
.card-meta { margin: 0 0 5px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.card-title { margin: 0; font-size: 20px; line-height: 1.25; }
.card-description { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.card-count { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 245px), 1fr)); gap: 14px; }
.photo { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 3px; background: var(--surface); text-align: left; cursor: zoom-in; }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease; }
.photo:hover img { transform: scale(1.025); }
.photo-name { display: block; overflow: hidden; padding: 8px 10px 10px; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.empty { grid-column: 1 / -1; padding: 44px 16px; color: var(--muted); text-align: center; }
.back-link { display: inline-block; margin-bottom: 22px; color: #326e14; font-weight: 700; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.site-footer { padding: 22px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
dialog { width: min(96vw, 1500px); max-width: none; max-height: 94vh; padding: 0; overflow: hidden; border: 0; border-radius: 4px; background: #111; color: #fff; }
dialog::backdrop { background: rgb(0 0 0 / .88); }
.viewer { display: grid; grid-template-rows: 48px minmax(0, 1fr) 42px; height: min(92vh, 1000px); }
.viewer-bar, .viewer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; }
.viewer-bar { background: #111; }
.viewer-footer { color: #d8ded9; font-size: 13px; }
.viewer button { min-width: 38px; min-height: 34px; border: 1px solid #606760; border-radius: 3px; background: #242824; color: #fff; font: inherit; cursor: pointer; }
#viewer-image { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; background: #080908; }
#viewer-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.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; }
@media (max-width: 600px) {
  .wrap { width: min(100% - 28px, 1480px); }
  .site-header, .album-header { padding-top: 32px; }
  .directory-heading, .album-toolbar { align-items: stretch; flex-direction: column; }
  .search-label input { width: 100%; }
  .gallery-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .card-copy { padding: 10px; }
  .card-title { font-size: 16px; }
  .card-description { font-size: 12px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .photo-name { padding: 6px 7px 8px; font-size: 11px; }
  .viewer { grid-template-rows: 46px minmax(0, 1fr) 42px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
