/* ---------- The Album: a wall of framed photos ---------- */
.album-page { max-width: 75rem; }
.album-bar { display: flex; align-items: center; gap: 0.625rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.album-spacer { flex: 1; }
.album-count { color: var(--text-2); font-size: 0.875rem; font-weight: 550; }
.album-year { width: auto; min-width: 7.5rem; height: 2.375rem; min-height: 2.375rem; } /* as tall as the search bar */
.album-search { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 0.375rem; flex: 1 1 22rem; max-width: 36rem; min-height: 2.375rem; padding: 0.25rem 0.625rem; border: 1px solid var(--border-strong); border-radius: 0.625rem; background: var(--surface); color: var(--text-3); cursor: text; }
.album-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.album-search input { flex: 1; min-width: 9rem; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; padding: 0.125rem 0; }
.album-search-clear { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; padding: 0; border: 0; border-radius: 50%; background: var(--surface-3); color: var(--text-2); cursor: pointer; }
.album-search-clear:hover { background: var(--accent-soft); color: var(--accent-text); }
.album-search-results { position: absolute; top: calc(100% + 0.375rem); left: 0; right: 0; z-index: 20; margin: 0; padding: 0.25rem; list-style: none; border: 1px solid var(--border); border-radius: 0.75rem; background: var(--surface); box-shadow: var(--shadow-lg); max-height: 18rem; overflow-y: auto; }
.album-filter-item { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.375rem 0.5rem; border: 0; border-radius: 0.5rem; background: none; font: inherit; text-align: left; color: var(--text); cursor: pointer; }
.album-filter-item:hover, .album-filter-item.is-active { background: var(--accent-soft); }

/* Rows of frames, each row centred; the frames hang at different heights (see lib/album.js) and have no outline. */
.album-wrap { display: block; }
.album-wall { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; padding: 1.5rem 1rem; border-radius: var(--radius-lg); background: var(--surface); box-sizing: border-box; }
.album-frame { position: relative; display: block; flex: none; height: var(--h); aspect-ratio: var(--r); max-width: 100%; padding: 0; border: 0; border-radius: 0.25rem; background: var(--surface-3); cursor: pointer; overflow: hidden; }
.album-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.album-frame:hover, .album-frame:focus-visible { outline: none; }
.album-frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.album-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.5rem 0.625rem 0.5rem; background: linear-gradient(transparent, rgba(0, 0, 0, 0.3)); color: #fff; font-size: 0.8125rem; font-weight: 550; text-align: left; opacity: 0; transition: opacity 0.15s; }
.album-cap span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.album-frame:hover .album-cap, .album-frame:focus-visible .album-cap { opacity: 1; }
.album-end { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; padding: 1.5rem 0 0.5rem; color: var(--text-3); font-size: 0.875rem; }

/* Adding photos */
.album-drop { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.5rem; border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--text-2); text-align: center; }
.album-drop p { margin: 0; }
.album-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.album-picked { display: flex; flex-wrap: wrap; gap: 0.5rem; width: 100%; }
.album-picked-item { position: relative; width: 5.5rem; height: 5.5rem; border-radius: 0.5rem; overflow: hidden; background: var(--surface-3); }
.album-picked-item img { width: 100%; height: 100%; object-fit: cover; }
.album-picked-item button { position: absolute; top: 0.25rem; right: 0.25rem; width: 1.375rem; height: 1.375rem; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; cursor: pointer; }
.album-picked-add { width: 5.5rem; height: 5.5rem; display: grid; place-items: center; border: 1px dashed var(--border-strong); border-radius: 0.5rem; background: none; color: var(--text-2); cursor: pointer; }
.album-picked-add:hover { border-color: var(--accent); color: var(--accent-text); }
.album-removed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.album-removed li { display: flex; align-items: center; gap: 0.75rem; }
.album-removed img { width: 3.5rem; height: 3.5rem; object-fit: cover; border-radius: 0.5rem; }
.album-removed span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.album-removed small { color: var(--text-2); }

/* A photo, large */
.album-lb { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1.25rem; background: rgba(8, 10, 16, 0.78); }
.album-lb-card { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; width: min(78rem, 100%); max-height: 100%; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.album-lb-stage { position: relative; display: grid; place-items: center; min-height: 18rem; max-height: calc(100vh - 2.5rem); background: #0b0d13; }
.album-lb-stage img { max-width: 100%; max-height: calc(100vh - 2.5rem); object-fit: contain; display: block; }
.album-lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 2.5rem; height: 2.5rem; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: #111; cursor: pointer; }
.album-lb-arrow--prev { left: 0.75rem; }
.album-lb-arrow--next { right: 0.75rem; }
.album-lb-side { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; overflow-y: auto; }
.album-lb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.album-lb-head h2 { margin: 0; font-size: 1.25rem; line-height: 1.3; overflow-wrap: anywhere; }
.album-lb-meta { margin: -0.5rem 0 0; color: var(--text-2); font-size: 0.875rem; }
.album-lb-people .field-label { margin-bottom: 0.5rem; font-size: 0.9375rem; }
.album-lb-chips { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.album-lb-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; }
.album-lb-count { margin: 0; color: var(--text-3); font-size: 0.8125rem; }

/* "In the album" on a person's page */
.album-strip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.album-strip-head h2 small { margin-left: 0.5rem; color: var(--text-2); font-size: 0.875rem; font-weight: 550; }
.album-strip-all { display: inline-flex; align-items: center; gap: 0.375rem; font-weight: 600; }
.album-strip { display: flex; align-items: flex-end; gap: 0.625rem; flex-wrap: wrap; margin-top: 0.75rem; }
.album-strip-item { display: block; height: 6rem; flex: none; border-radius: 0.25rem; background: var(--surface-3); overflow: hidden; }
.album-strip-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.album-strip-more { display: grid; place-items: center; width: 4rem; height: 6rem; border: 1px dashed var(--border-strong); border-radius: 0.25rem; color: var(--text-2); font-weight: 650; text-decoration: none; }
.album-strip-more:hover { border-color: var(--accent); color: var(--accent-text); }

