.photo-archive { background: var(--navy); color: var(--cream); padding-block: 78px; scroll-margin-top: 118px; }
.photo-archive .chapter-number { color: #c8d1cb; }
.photo-archive-heading { max-width: 820px; }
.photo-archive-heading h2 { color: white; font-size: clamp(40px, 5vw, 62px); letter-spacing: -.04em; line-height: 1.05; }
.photo-archive-heading > p:last-child { color: #d6dde4; font-family: Georgia, 'Times New Roman', serif; font-size: 18px; line-height: 1.7; }
.photo-upload-layout { align-items: start; display: grid; gap: clamp(30px, 5vw, 62px); grid-template-columns: minmax(0, 1.28fr) minmax(300px, .72fr); margin-top: 45px; }
.photo-upload-form { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); display: grid; gap: 19px; padding: clamp(24px, 3vw, 38px); }
.photo-upload-form > label:not(.photo-consent) { display: grid; gap: 7px; }
.photo-upload-form > label > span { color: white; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.photo-upload-form > label > span small { color: #e2bd79; font-size: 9px; margin-left: 5px; }
.photo-upload-form input:not([type="checkbox"]), .photo-upload-form textarea { background: var(--ivory); border: 1px solid rgba(255,255,255,.35); border-radius: 0; color: var(--navy); font: inherit; min-height: 48px; padding: 10px 12px; width: 100%; }
.photo-upload-form textarea { resize: vertical; }
.photo-upload-form input[type="file"] { padding: 8px; }
.form-help { color: #c8d1cb; font-size: 11px; line-height: 1.5; }
.photo-consent { align-items: start; color: #d6dde4; cursor: pointer; display: grid; font-size: 13px; gap: 11px; grid-template-columns: auto 1fr; line-height: 1.5; }
.photo-consent input { accent-color: var(--gold); height: 18px; margin-top: 2px; width: 18px; }
.photo-upload-action { border-top: 1px solid rgba(255,255,255,.18); display: grid; gap: 10px; padding-top: 18px; }
.photo-upload-action button { background: var(--gold); border: 0; color: white; cursor: pointer; font-size: 11px; font-weight: 800; justify-self: start; letter-spacing: .07em; min-height: 48px; padding: 11px 18px; text-transform: uppercase; }
.photo-upload-action button:hover, .photo-upload-action button:focus-visible { background: var(--sage); }
.photo-upload-action button:disabled { cursor: wait; opacity: .62; }
.photo-upload-status { color: #d6dde4; font-size: 13px; margin: 0; min-height: 22px; }
.photo-upload-status.is-success { color: #dce8df; }
.photo-upload-status.is-error, .photo-manage-status.is-error { color: #ffd0bf; }
.photo-gallery-panel { min-width: 0; }
.photo-gallery-heading { align-items: end; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 18px; }
.photo-gallery-heading h3 { color: white; font-size: clamp(28px, 3vw, 39px); margin: 0; }
.photo-gallery-heading p { color: #bfc9d2; font-size: 12px; margin: 4px 0 0; }
.photo-manage-button { background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,.45); color: #d6dde4; cursor: pointer; flex: 0 0 auto; font-size: 9px; font-weight: 800; letter-spacing: .08em; min-height: 36px; padding: 5px 0; text-transform: uppercase; }
.photo-manage-button:hover, .photo-manage-button:focus-visible, .photo-manage-button[aria-pressed="true"] { border-bottom-color: var(--gold); color: #e2bd79; }
.photo-manage-status { color: #c8d1cb; font-size: 12px; margin: -8px 0 14px; min-height: 19px; }
.photo-gallery { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.photo-gallery-item { align-self: start; background: var(--cream); color: var(--navy); margin: 0; min-width: 0; position: relative; }
.photo-gallery-item > a { background: #172535; display: block; line-height: 0; }
.photo-gallery-item img { display: block; height: auto; object-fit: contain; transition: opacity .18s ease; width: 100%; }
.photo-gallery-item a:hover img, .photo-gallery-item a:focus-visible img { opacity: .91; }
.photo-gallery-item figcaption { display: grid; gap: 4px; padding: 12px 13px 14px; }
.photo-gallery-item figcaption strong { font-family: Georgia, 'Times New Roman', serif; font-size: 16px; font-weight: 400; line-height: 1.3; overflow-wrap: anywhere; }
.photo-gallery-item figcaption span { color: var(--sage); font-size: 11px; overflow-wrap: anywhere; }
.photo-admin-controls { background: rgba(36,54,75,.92); box-shadow: 0 2px 12px rgba(0,0,0,.24); display: none; gap: 5px; padding: 5px; position: absolute; right: 8px; top: 8px; z-index: 2; }
.photo-gallery.is-managing .photo-admin-controls { display: flex; }
.photo-gallery.is-managing .photo-gallery-item { outline: 1px solid #d7ad98; outline-offset: 2px; }
.photo-admin-controls button { align-items: center; background: var(--cream); border: 1px solid rgba(255,255,255,.4); color: var(--navy); cursor: pointer; display: inline-flex; font-size: 16px; font-weight: 800; height: 34px; justify-content: center; padding: 0; width: 34px; }
.photo-admin-controls .photo-delete-button { background: #8c3f2c; color: white; }
.photo-admin-controls button:disabled { cursor: wait; opacity: .45; }
.photo-gallery-message, .photo-gallery-cache-note { border: 1px solid rgba(255,255,255,.18); color: #c8d1cb; display: grid; gap: 14px; grid-column: 1 / -1; justify-items: center; margin: 0; padding: 32px; text-align: center; }
.photo-gallery-message p, .photo-gallery-cache-note p { margin: 0; }
.photo-gallery-cache-note { background: rgba(255,255,255,.05); padding: 15px; }
.photo-gallery-retry, .photo-gallery-more { background: transparent; border: 1px solid rgba(255,255,255,.45); color: white; cursor: pointer; font-size: 10px; font-weight: 800; letter-spacing: .08em; min-height: 43px; padding: 9px 14px; text-transform: uppercase; }
.photo-gallery-more { display: block; margin: 20px auto 0; }
.photo-gallery-retry:hover, .photo-gallery-retry:focus-visible, .photo-gallery-more:hover, .photo-gallery-more:focus-visible { background: var(--gold); border-color: var(--gold); }
.photo-gallery-more[hidden] { display: none; }
body.photo-lightbox-open { overflow: hidden; }
.photo-lightbox { background: rgba(9,17,26,.98); border: 0; box-sizing: border-box; color: white; height: 100dvh; margin: 0; max-height: none; max-width: none; padding: 0; width: 100vw; }
.photo-lightbox::backdrop { background: rgba(9,17,26,.96); }
.photo-lightbox-shell { box-sizing: border-box; display: grid; height: 100%; padding: max(72px, calc(env(safe-area-inset-top) + 60px)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); width: 100%; }
.photo-lightbox-actions { align-items: flex-end; display: flex; flex-direction: column; gap: 7px; position: fixed; right: max(13px, env(safe-area-inset-right)); top: max(13px, env(safe-area-inset-top)); z-index: 2; }
.photo-lightbox-close { align-items: center; background: var(--cream); border: 1px solid rgba(255,255,255,.72); color: var(--navy); cursor: pointer; display: inline-flex; gap: 7px; justify-content: center; min-height: 46px; min-width: 90px; padding: 8px 12px; }
.photo-lightbox-close span { font-size: 23px; line-height: .8; }
.photo-lightbox-close strong, .photo-lightbox-download strong { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.photo-lightbox-download { align-items: center; color: rgba(255,255,255,.72); display: inline-flex; font-size: 11px; gap: 5px; padding: 2px; }
.photo-lightbox-nav { background: rgba(9,17,26,.6); border: 1px solid rgba(255,255,255,.24); color: white; cursor: pointer; display: grid; height: 62px; place-items: center; position: fixed; top: 50%; transform: translateY(-50%); width: 44px; z-index: 2; }
.photo-lightbox-nav[hidden] { display: none; }
.photo-lightbox-nav span { font-family: Georgia, 'Times New Roman', serif; font-size: 37px; line-height: .8; }
.photo-lightbox-previous { left: max(10px, env(safe-area-inset-left)); }
.photo-lightbox-next { right: max(10px, env(safe-area-inset-right)); }
.photo-lightbox-figure { display: grid; gap: 14px; grid-template-rows: minmax(0, 1fr) auto; height: 100%; margin: 0; min-height: 0; min-width: 0; width: 100%; }
.photo-lightbox-figure img { align-self: center; display: block; height: auto; justify-self: center; max-height: 100%; max-width: 100%; object-fit: contain; width: auto; }
.photo-lightbox-figure figcaption { display: grid; gap: 3px; line-height: 1.35; margin: 0 auto; max-width: 900px; text-align: center; }
.photo-lightbox-figure figcaption strong { color: white; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(16px, 3.5vw, 21px); font-weight: 400; }
.photo-lightbox-figure figcaption span { color: #c3ccd5; font-size: 12px; }
@media (max-width: 900px) { .photo-archive { scroll-margin-top: 150px; } .photo-upload-layout { grid-template-columns: 1fr; } .photo-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .photo-archive { padding-block: 58px; } .photo-gallery { grid-template-columns: 1fr; } .photo-gallery-heading { align-items: flex-start; flex-direction: column; gap: 7px; } }
@media print { .photo-archive, .photo-lightbox { display: none; } }
/* A full-width album for the larger family collection. */
.photo-upload-layout { display: block; margin-top: 32px; }
.photo-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.photo-gallery-item img { aspect-ratio: auto; height: auto; width: 100%; object-fit: contain; background: transparent; }
.photo-gallery-item figcaption { padding: 10px 12px; }
.photo-gallery-item figcaption strong:empty { display: none; }
.album-upload { margin: 26px 0 36px; max-width: 720px; }
.album-upload > summary { cursor: pointer; width: fit-content; border: 1px solid #c8d1cb; padding: 13px 20px; font-size: 14px; }
.album-upload[open] > summary { margin-bottom: 18px; }
.photo-gallery-more { margin-top: 28px; }
@media (max-width: 1000px) { .photo-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .photo-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .photo-gallery-heading { align-items: start; gap: 16px; } }
@media (max-width: 380px) { .photo-gallery { grid-template-columns: 1fr; } }

.photo-gallery-item figcaption span { font-size: 13px; }
@media (max-width:700px) { .photo-archive { padding-block:44px; } }
