* { box-sizing: border-box; }
:root {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #252b27; background: #f8f8f4; font-synthesis: none;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  --gutter: clamp(16px, 5vw, 72px);
}
body { margin: 0; min-width: 0; }
body.viewer-open { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 3px solid #729d79; outline-offset: 3px; }
button, input, main, section { min-width: 0; }
.topbar {
  min-height: 64px;
  padding: max(10px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 10px max(var(--gutter), env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid #e7e8e0;
}
.brand { border: 0; background: none; display: flex; align-items: center; gap: 9px; min-height: 44px; font-weight: 650; font-size: 18px; letter-spacing: -.6px; padding: 0; }
.brand svg { width: 30px; height: 30px; flex: none; fill: none; stroke: #435c45; stroke-width: 1.5; }
.privacy { min-height: 44px; padding: 10px 12px; border: 1px solid #dfe3d7; border-radius: 9px; background: transparent; font-size: 13px; color: #566452; white-space: nowrap; }
main { width: 100%; max-width: 1360px; padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); margin: auto; }
.hero { padding: 26px 0 28px; max-width: 930px; }
.eyebrow { font-size: 10px; letter-spacing: 2px; font-weight: 700; color: #74806f; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 8.5vw, 42px); line-height: 1.12; letter-spacing: -1.3px; font-weight: 400; margin: 12px 0; overflow-wrap: break-word; }
.hero > p { font-size: 15px; line-height: 1.55; color: #687063; margin: 0 0 20px; }
#search-form { display: flex; align-items: center; gap: 8px; border: 1px solid #dfe3d7; border-radius: 14px; background: #fff; padding: 6px; box-shadow: 0 5px 22px #27392406; max-width: 800px; }
#search-form > svg { display: none; }
#query { flex: 1 1 0%; width: 0; min-height: 48px; border: 0; border-radius: 7px; background: none; font-size: 16px; padding: 12px; }
input::placeholder { color: #81897c; opacity: 1; }
.primary { border: 0; background: #324c38; color: white; border-radius: 9px; min-height: 48px; padding: 13px 18px; font-size: 14px; font-weight: 600; display: inline-flex; gap: 12px; align-items: center; justify-content: center; }
#search-form .primary { flex: 0 0 48px; width: 48px; height: 48px; padding: 12px; }
.search-label, .search-arrow { display: none; }
.search-submit-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.suggestions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: #697360; }
.suggestions button { min-height: 44px; max-width: 100%; border: 1px solid #e1e5d9; background: none; border-radius: 22px; padding: 9px 12px; font-size: 12px; color: #58654f; }
.section-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; }
h2 { font-weight: 600; font-size: 18px; letter-spacing: -.35px; margin: 0; overflow-wrap: anywhere; }
.section-top > span { font-size: 12px; color: #747e6e; }
.collections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 30px; }
.collection { position: relative; overflow: hidden; border: 0; padding: 0; background: #bac4b6; border-radius: 12px; aspect-ratio: 1.55; min-height: 100px; text-align: left; }
.collection img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.collection:after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #102218d9, transparent 95%); }
.collection span { position: absolute; bottom: 12px; left: 12px; right: 30px; z-index: 1; color: white; font-size: 14px; line-height: 1.3; font-weight: 600; letter-spacing: -.2px; overflow-wrap: anywhere; }
.collection .arrow { left: auto; right: 12px; font-weight: 400; }
.results-top { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
.results-top > div { min-width: 0; }
#result-summary { font-size: 12px; line-height: 1.5; color: #6d7965; margin: 7px 0 0; overflow-wrap: anywhere; }
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #edeee7; padding: 4px; border-radius: 10px; gap: 2px; }
.filters button { min-height: 44px; border: 0; background: none; font-size: 13px; padding: 9px 10px; border-radius: 7px; color: #637157; }
.filters button[aria-pressed=true] { background: #fff; color: #374e39; box-shadow: 0 1px 4px #00000008; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-height: 120px; }
.photo { padding: 0; border: 0; background: #e7ebe2; border-radius: 10px; overflow: hidden; aspect-ratio: 1; position: relative; text-align: left; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.photo .caption { display: none; position: absolute; inset: auto 0 0; background: linear-gradient(transparent, #07140caf); padding: 40px 13px 12px; color: white; font-size: 12px; opacity: 0; transition: opacity .2s; }
.skeleton { border-radius: 10px; aspect-ratio: 1; background: linear-gradient(100deg, #e8ebe2 30%, #f1f3ec 50%, #e8ebe2 70%); background-size: 200% 100%; animation: pulse 1.4s infinite; }
@keyframes pulse { to { background-position: -200% 0; } }
.notice { padding: 22px; background: #eef1e8; border-radius: 10px; font-size: 14px; line-height: 1.5; margin: 10px 0 22px; }
.notice button { min-height: 44px; background: white; border: 1px solid #d3dbc9; border-radius: 7px; padding: 10px 15px; font-size: 14px; }
.notice p { margin: 0 0 14px; }
.empty { grid-column: 1 / -1; color: #68775e; text-align: center; padding: 24px 12px; }
footer { max-width: 1360px; margin: 30px auto 0; padding: 20px max(var(--gutter), env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 8px; color: #747e6e; font-size: 12px; line-height: 1.6; border-top: 1px solid #e7e8e0; overflow-wrap: anywhere; }
/* The mobile preview follows the visible viewport, including browser bars. */
dialog { border: 0; padding: 0; margin: 0; inset: 0; width: 100%; max-width: 100%; height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh; background: #141b16; overflow: hidden; overscroll-behavior: contain; }
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #101c15db; backdrop-filter: blur(6px); }
.viewer-image { flex: 1 1 0%; min-height: 0; width: 100%; background: #141b16; display: flex; align-items: center; justify-content: center; }
.viewer-image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.close { position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); background: #132019d9; color: white; border: 1px solid #ffffff60; font-size: 30px; border-radius: 50%; width: 48px; height: 48px; z-index: 2; line-height: 1; }
.viewer-bottom { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 16px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: #f8f8f4; max-height: 50%; overflow-y: auto; }
.viewer-bottom > div { min-width: 0; overflow-wrap: anywhere; }
.viewer-bottom p { margin: 0 0 5px; font-size: 14px; line-height: 1.4; }
.viewer-bottom span { font-size: 12px; color: #647357; }
.viewer-bottom .primary { flex-shrink: 0; }
.viewer-bottom .primary span { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
[hidden] { display: none !important; }
@media (min-width: 600px) {
  .topbar { min-height: 74px; }
  .brand { font-size: 20px; }
  .hero { padding: 42px 0 36px; }
  h1 { font-size: clamp(42px, 5.4vw, 65px); letter-spacing: -2px; }
  .hero > p { font-size: 16px; }
  #search-form > svg { display: block; width: 20px; height: 20px; flex: none; fill: none; stroke: #8b9389; stroke-width: 1.6; margin-left: 14px; }
  #query { padding-left: 4px; }
  #search-form .primary { flex: 0 0 auto; width: auto; padding: 13px 20px; gap: 20px; }
  .search-label, .search-arrow { display: inline; }
  .search-submit-icon { display: none; }
  .collection { aspect-ratio: 1.95; }
  .collection span { font-size: 16px; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .photo, .skeleton { aspect-ratio: 1.15; }
  .photo .caption { display: block; }
}
@media (min-width: 768px) {
  .results-top { flex-direction: row; align-items: end; flex-wrap: nowrap; gap: 24px; }
  .filters { flex: none; }
  footer { flex-direction: row; justify-content: space-between; gap: 24px; }
  dialog { inset: 0; margin: auto; width: 90vw; max-width: 1050px; height: auto; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); border-radius: 15px; box-shadow: 0 20px 120px #0005; }
  .viewer-image { flex: 1 1 auto; height: 73vh; height: 73dvh; }
  .viewer-bottom { flex-direction: row; justify-content: space-between; align-items: center; padding: 19px 24px; }
}
@media (min-width: 1000px) {
  .topbar { min-height: 88px; }
  .hero { padding: 58px 0 44px; }
  .collections { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 44px; }
  .collection span { bottom: 17px; left: 18px; right: 34px; font-size: 15px; }
  .collection .arrow { left: auto; right: 17px; }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
}
@media (max-height: 500px) and (max-width: 767px) {
  .viewer-bottom { flex-direction: row; align-items: center; justify-content: space-between; padding-top: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media (hover: hover) {
  .primary:hover { background: #243b29; }
  .suggestions button:hover { background: #eaf0e4; }
  .collection:hover img { transform: scale(1.04); }
  .photo:hover img { transform: scale(1.035); }
  .photo:hover .caption { opacity: 1; }
}
.photo:focus-visible .caption { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
