.collection-document { scrollbar-width: auto; }
.collection-document::-webkit-scrollbar { display: initial; }
.collection-page { background: #f8f7f3; color: #102c45; }
.collection-header { position: sticky; top: 0; z-index: 5; background: #f8f7f3; border-bottom: 1px solid #102c4524; }
.collection-header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 12px clamp(14px, 3vw, 48px); max-width: 1920px; margin: auto; }
.collection-brand { justify-self: start; display: inline-flex; align-items: center; gap: .13em; font: clamp(27px, 3vw, 44px)/1 var(--serif); letter-spacing: -.06em; white-space: nowrap; }
.collection-brand .brand-mark { fill: #9b7136; }
.collection-register { justify-self: end; }
.collection-register, .photo-info .button { font-size: 14px; min-height: 40px; }
.collection-nav, .gallery-sort, .category-picker { display: flex; align-items: center; }
.collection-nav { gap: clamp(16px, 3vw, 40px); }
.category-picker { gap: 8px; font-size: 14px; font-weight: 600; }
.category-picker select { color: inherit; background: #fff; border: 1px solid #102c4535; border-radius: 6px; padding: 8px 5px 8px 8px; }
.gallery-sort { gap: 5px; }
.gallery-sort button { min-height: 40px; padding: 7px 13px; border: 0; border-radius: 99px; background: transparent; font-size: 14px; }
.gallery-sort button:hover { background: #ece8df; }
.gallery-sort button[aria-pressed="true"] { background: #e9d7b9; }
.collection-main { max-width: 1920px; margin: auto; padding: 9px clamp(9px, 1.15vw, 20px) 30px; }
.gallery-grid { --gallery-columns: 5; display: grid; grid-template-columns: repeat(var(--gallery-columns), minmax(0, 1fr)); gap: 9px; }
.gallery-column { display: grid; align-content: start; gap: 9px; }
.gallery-tile { display: block; position: relative; aspect-ratio: var(--tile-ratio); height: var(--tile-height, auto); min-height: 130px; width: 100%; overflow: hidden; border: 0; border-radius: 7px; padding: 0; text-align: left; background: transparent; cursor: pointer; container-type: inline-size; }
.gallery-tile img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center var(--photo-position, 48%); transform: scale(1.025); cursor: inherit; }
/* Shared by existing and future uploads: approved soft overlay, over the photo. */
.gallery-tile::after { content: ''; position: absolute; inset: auto 0 0; height: 24%; background: linear-gradient(to top, rgba(250,248,242,1) 0%, rgba(250,248,242,.78) 27%, rgba(250,248,242,.35) 61%, rgba(250,248,242,0) 100%); opacity: .6; pointer-events: none; }
.gallery-tile:focus-visible { outline-offset: -4px; }
.gallery-metadata { position: absolute; z-index: 1; inset-inline: 3%; bottom: clamp(10px, 3.5cqw, 17px); pointer-events: none; color: #193249; }
.gallery-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); font-size: clamp(11px, .95vw, 14px); font-variant-numeric: tabular-nums; }
.gallery-metric { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; }
.gallery-metric svg { flex: none; width: 1.18em; height: 1.18em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@container (min-width: 221px) {
  .gallery-metric { flex-direction: row; gap: 4px; }
}
.gallery-empty { grid-column: 1 / -1; padding: 24px 4px; }
.account-benefits {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 19px;
  list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--account-line);
}
.account-benefits li {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 9px;
  padding: 8px 0; border-bottom: 1px solid var(--account-line); font-size: 14px;
}
.account-benefits svg, .account-instagram { display: block; width: 18px; height: 18px; margin-top: 1px; }
.account-benefits svg { fill: none; stroke: light-dark(#865819, #efc88e); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.account-instagram { object-fit: contain; }
.account-upload { padding: 11px 14px; border-inline-start: 3px solid var(--account-accent); background: var(--account-tint); font-size: 14px; }
.collection-footer { display: flex; justify-content: space-between; gap: 14px; padding: 18px clamp(14px, 3vw, 48px); border-top: 1px solid #102c4524; font-size: 13px; }
.collection-footer span { letter-spacing: .12em; }
.collection-footer a:hover, .back-to-gallery:hover, .photo-missing a { text-decoration: underline; }
.photo-header-inner { display: flex; justify-content: space-between; }
.back-to-gallery { font-size: 14px; }
.photo-detail { padding: 12px clamp(10px, 2vw, 28px) 24px; }
.photo-info { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; max-width: 1600px; margin: 0 auto 14px; }
.photo-category, .photo-resolution { margin: 0; }
.photo-category { font-weight: 600; font-size: 15px; }
.photo-resolution { margin-top: 3px; font-size: 13px; color: #4c626f; }
.photo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-info .photo-open { border-color: #102c4540; color: #102c45; background: transparent; }
.photo-full { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 165px); object-fit: contain; margin: 0 auto; }
.photo-info[hidden], .photo-full[hidden] { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 1160px) { .gallery-grid { --gallery-columns: 4; } }
@media (max-width: 880px) { .gallery-grid { --gallery-columns: 3; } }
@media (max-width: 680px) {
  .collection-header-inner { grid-template-columns: 1fr auto; gap: 8px; padding-block: 8px; }
  .collection-nav { grid-row: 2; grid-column: 1 / -1; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
  .gallery-sort { gap: 1px; }
  .gallery-sort button { padding: 6px 9px; font-size: 13px; }
  .category-picker { gap: 5px; font-size: 12px; }
  .category-picker select { max-width: 110px; }
  .gallery-grid { --gallery-columns: 2; gap: 7px; }
  .gallery-column { gap: 7px; }
  .gallery-metadata { inset-inline: 7px; }
  .photo-full { max-height: calc(100dvh - 200px); }
}
@media (max-width: 375px) {
  .account-benefits { column-gap: 9px; }
  .account-benefits li { font-size: 13px; }
}
@media (max-width: 330px) { .gallery-grid { --gallery-columns: 1; } }

/* Descriptive navigation, based on the approved clock, star and flame reference. */
.gallery-sort { gap: 25px; }
.gallery-sort a { display:flex; flex-direction:column; align-items:center; gap:5px; padding:5px 4px; color:#213749; font-size:12px; font-weight:700; line-height:1.2; text-transform:uppercase; text-decoration:none; min-width:58px; }
.gallery-sort a svg { width:31px; height:31px; fill:#c8c7c4; transition:fill .16s ease; }
.gallery-sort a:hover svg { fill:#a87c3b; }
.gallery-sort a[aria-current="page"] { color:#f13752; }
.gallery-sort a[aria-current="page"] svg { fill:#f13752; }
.gallery-sort a:focus-visible { outline:2px solid #a87c3b; outline-offset:4px; border-radius:4px; }
.gallery-sort a svg.random-icon { fill:none; stroke:#c8c7c4; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; transition:stroke .16s ease; }
.gallery-sort a:hover svg.random-icon { stroke:#a87c3b; }
.gallery-sort a[aria-current="page"] svg.random-icon { stroke:#f13752; }
.collection-account-actions { display:flex; justify-self:end; align-items:center; gap:10px; }
.collection-login { color:#102c45; border-color:#102c4555; font-size:14px; min-height:40px; }
.collection-login[hidden] { display:none; }
@media (min-width:681px) and (max-width:1120px) {
  .collection-header-inner { grid-template-columns:1fr auto; }
  .collection-nav { grid-row:2; grid-column:1 / -1; justify-content:center; }
}
.account-benefits[hidden],.account-upload[hidden] { display:none; }
.account-submit:disabled { opacity:.65; cursor:wait; }
.password-field { display:block; position:relative; min-width:0; }
.account-dialog .password-field input { padding-right:48px; }
.password-toggle { position:absolute; right:2px; top:50%; transform:translateY(-50%); display:grid; place-items:center; width:42px; height:42px; padding:10px; border:0; border-radius:3px; background:transparent; color:#806138; }
.password-toggle:hover { background:#bd914b15; }
.password-toggle:focus-visible { outline:2px solid #bd914b; outline-offset:-3px; }
.password-toggle svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.password-toggle .password-eye-slash { display:none; }
.password-toggle[aria-pressed=true] .password-eye-slash { display:block; }
@media(max-width:680px) { .gallery-sort { gap:12px; } .gallery-sort a { min-width:50px; font-size:11px; } .gallery-sort a svg { width:28px; height:28px; } }
@media(max-width:380px) {
  .collection-account-actions { gap: 7px; }
  .collection-account-actions .button { min-height: 36px; padding: 8px 10px; font-size: 12px; }
  .collection-account-actions .member-avatar { flex-basis: 26px; width: 26px; height: 26px; font-size: 21px; }
}

/* Loading never displays an out-of-date photo set. Offscreen cards retain their exact layout. */
.gallery-loading{min-height:130px;display:flex;justify-content:center;align-items:center;gap:12px;color:#4c626f;font-size:14px}
.gallery-loading[hidden]{display:none}
.gallery-loading button{border:1px solid #b89a68;border-radius:999px;background:transparent;color:#193249;padding:9px 16px}
.gallery-tile{content-visibility:auto;contain-intrinsic-size:auto var(--tile-height,130px)}
.gallery-more{display:flex;justify-content:center;padding:18px 0 4px;min-height:60px;overflow-anchor:none}
.gallery-more[hidden]{display:none}
.gallery-more button{min-height:44px;padding:10px 24px;border:1px solid #b89a68;border-radius:999px;background:transparent;color:#193249;font:inherit;cursor:pointer}
.gallery-more button:hover{background:#e9d7b933}
.gallery-more button:focus-visible{outline:2px solid #9b7136;outline-offset:3px}
.gallery-notice{margin:6px 0 16px;padding:13px 16px;background:#efe6d6;border:1px solid #d7c3a0;border-radius:5px;font-size:14px;line-height:1.6}
.gallery-notice a{text-decoration:underline;text-underline-offset:3px}
.gallery-notice[hidden]{display:none}
.collection-account-actions{min-width:0;max-width:100%}
.collection-account-actions .member-identity{flex:1;overflow:hidden}
.collection-account-actions .button{flex:none}
