:root {
  color-scheme: light;
  --paper: #f7f4ee;
  --white: #fffcf7;
  --ink: #222522;
  --muted: #5f6259;
  --line: #dcd8cc;
  --green: #263f33;
  --wash: #e7ece4;
  --error: #893423;
  font: 16px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
h1, h2, p { margin: 0; }
h1, h2 { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; font-weight: 400; }
h1 { font-size: clamp(2.35rem, 7vw, 5.2rem); line-height: .98; letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.55rem, 3.5vw, 2rem); line-height: 1.15; letter-spacing: -.025em; }
a { color: var(--green); }
a:hover { text-decoration-thickness: 2px; }
button, .button, input, textarea, select { font: inherit; color: inherit; }
button, .button {
  padding: .61rem 1rem; min-height: 44px; border: 1px solid var(--line); background: var(--white);
  border-radius: 6px; cursor: pointer; font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; text-align: center;
}
button:hover, .button:hover { background: var(--wash); }
button:disabled { cursor: default; opacity: .52; }
.primary { background: var(--green); color: #fff; border-color: var(--green); }
.primary:hover { background: #365646; }
.quiet { background: transparent; border-color: transparent; }
:focus-visible { outline: 3px solid #46745a; outline-offset: 3px; }
img { display: block; max-width: 100%; }
.masthead {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 73px;
  padding: .7rem max(5vw, 1rem); border-bottom: 1px solid var(--line);
}
.brand { color: var(--ink); display: inline-flex; align-items: baseline; gap: .58rem; text-decoration: none; letter-spacing: .16em; }
.brand strong { font-size: 1.25rem; letter-spacing: .115em; }
.brand span { font-size: .68rem; }
.masthead nav { display: flex; align-items: center; }
.masthead nav a { font-size: .88rem; }
main { width: min(90%, 1450px); margin: 0 auto; padding-bottom: 6.5rem; }
.intro { padding: clamp(2.5rem, 7vw, 6.5rem) 0 clamp(2rem, 5vw, 4.4rem); }
.eyebrow { color: var(--green); letter-spacing: .15em; font-size: .7rem; font-weight: 750; margin-bottom: 1.05rem; }
.intro-note { margin-top: 1.35rem; color: var(--muted); font-size: 1.02rem; max-width: 63ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.loading, .empty { color: var(--muted); padding: 1.5rem 0; }
.login-panel {
  max-width: 480px; margin: clamp(2.5rem, 10vh, 7rem) auto 0; background: var(--white);
  border: 1px solid var(--line); border-radius: 13px; padding: clamp(1.25rem, 5vw, 2.5rem);
}
.login-panel .intro { padding: 0 0 1.7rem; }
.login-panel h1 { font-size: clamp(2.25rem, 7vw, 3.4rem); }
.login-panel form { display: grid; gap: 1rem; }
label { display: grid; gap: .33rem; font-size: .9rem; font-weight: 610; min-width: 0; }
input, textarea, select {
  box-sizing: border-box; min-width: 0; width: 100%; min-height: 44px; border: 1px solid #bebdb1;
  border-radius: 6px; padding: .55rem .65rem; background: var(--white); font-size: 1rem; font-weight: 400;
}
input[type=checkbox] { width: 1.15rem; min-height: 1.15rem; accent-color: var(--green); }
.gallery-head, .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.gallery-head { align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.25rem; }
.gallery-head p, .delivery p { margin-top: .48rem; color: var(--muted); }
.filters, .actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.filters button { white-space: nowrap; font-size: .87rem; }
.filters span { color: var(--muted); font-variant-numeric: tabular-nums; }
button[aria-pressed=true] { border-color: var(--green); background: var(--wash); color: var(--green); }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.68rem, 1.8vw, 1.6rem); }
.photo { min-width: 0; }
.photo-image { position: relative; overflow: hidden; background: #ebe5d9; border-radius: 7px; }
.photo-open { border: 0; padding: 0; display: block; width: 100%; border-radius: inherit; }
.photo-open img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.photo-open:focus-visible { outline-offset: -4px; }
.is-picked .photo-image { box-shadow: 0 0 0 2px var(--green); }
.pick {
  position: absolute; top: .48rem; right: .48rem; border: 1px solid #e7e2d8; background: var(--white);
  color: var(--green); border-radius: 50%; width: 44px; min-height: 44px; padding: 0;
}
.pick svg, .viewer-pick svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.65; }
.pick[aria-pressed=true] { color: #fff; background: var(--green); }
[aria-pressed=true] svg { fill: currentColor; }
.filename {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--muted);
  margin-top: .45rem; font-size: .76rem; letter-spacing: .01em;
}
.delivery, .panel {
  border: 1px solid var(--line); padding: clamp(1rem, 3vw, 1.7rem); border-radius: 9px; background: var(--white);
}
.delivery { margin-bottom: 2rem; }
.download-list, .admin-files { list-style: none; padding: 0; margin: .7rem 0 0; }
.download-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
.download-list a { display: block; padding: .6rem .25rem; overflow-wrap: anywhere; }
.status {
  position: fixed; z-index: 3; left: 1rem; right: 1rem; bottom: 5.25rem; width: fit-content; max-width: min(640px, calc(100% - 2rem));
  padding: .8rem 1rem; color: #fff; background: var(--green); border-radius: 7px; overflow-wrap: anywhere;
  max-height: 32vh; overflow: auto; box-shadow: 0 8px 24px #291d1622;
}
.status.error { background: var(--error); }
dialog { border: 1px solid var(--line); border-radius: 10px; background: var(--white); max-width: min(420px, 92%); padding: 1.4rem; }
dialog::backdrop { background: #191c18c4; }
dialog p { margin: .65rem 0; }
dialog .actions { justify-content: end; margin-top: 1rem; }
#submit-error { color: var(--error); }
#photo-viewer {
  position: fixed; inset: 0; margin: 0;
  width: 100%; height: 100dvh; max-width: none; max-height: none;
  padding: max(.45rem, env(safe-area-inset-top)) max(.65rem, env(safe-area-inset-right))
    max(.5rem, env(safe-area-inset-bottom)) max(.65rem, env(safe-area-inset-left));
  background: transparent; color: #fff; border: 0; border-radius: 0;
  user-select: none;
}
#photo-viewer::backdrop { background: rgb(8 10 9 / 91%); }
#photo-viewer[open] {
  display: grid;
  grid-template: "top top top" auto "previous image next" minmax(0, 1fr) ". footer ." auto / auto minmax(0, 1fr) auto;
  gap: .2rem .5rem;
}
.viewer-top { display: flex; align-items: center; justify-content: space-between; gap: .55rem; }
#photo-viewer .viewer-top { grid-area: top; }
.viewer-top p { overflow-wrap: anywhere; font-size: .85rem; margin: 0; }
.viewer-image { grid-area: image; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
.viewer-image img { width: auto; height: auto; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; }
.viewer-image img.viewer-pageable { cursor: pointer; }
.viewer-footer { grid-area: footer; text-align: center; }
#photo-viewer .viewer-close, #photo-viewer .viewer-nav {
  width: clamp(44px, 5.5vw, 64px); height: clamp(44px, 5.5vw, 64px); padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: #fff; font-size: 2rem; line-height: 1;
}
#photo-viewer .viewer-nav { align-self: center; opacity: .6; }
#photo-viewer .viewer-nav:not(:disabled):hover, #photo-viewer .viewer-nav:focus-visible,
#photo-viewer[data-hover-side=previous] .viewer-nav[data-viewer=previous]:not(:disabled),
#photo-viewer[data-hover-side=next] .viewer-nav[data-viewer=next]:not(:disabled) {
  opacity: 1; background: rgb(255 255 255 / 12%);
}
#photo-viewer .viewer-close:is(:hover, :focus-visible) { background: rgb(255 255 255 / 12%); }
#photo-viewer .viewer-nav:disabled { visibility: hidden; }
.viewer-nav::before {
  content: ''; width: 15px; height: 15px; border: solid currentColor; border-width: 3px 3px 0 0;
  transform: translateX(-3px) rotate(45deg);
}
.viewer-nav[data-viewer=previous] { grid-area: previous; }
.viewer-nav[data-viewer=previous]::before { transform: translateX(3px) rotate(-135deg); }
.viewer-nav[data-viewer=next] { grid-area: next; }
#viewer-error:empty { display: none; }
#viewer-error { color: #f9c0b2; margin: .25rem; }
#photo-viewer .icon[aria-pressed=true] { color: #b9e5cc; opacity: 1; }
.shortcut-help { font-size: .8rem; color: var(--muted); }
.shortcut-help kbd { font: inherit; font-weight: 700; color: var(--ink); }
#photo-viewer .shortcut-help { margin: .1rem 0 .25rem; color: #ccd2ce; }
@media (max-width: 620px) {
  #photo-viewer[open] {
    grid-template-areas: "top top top" "image image image" "previous footer next";
  }
}
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(285px, 100%), 1fr)); gap: 1.4rem; }
.project { display: block; text-decoration: none; color: var(--ink); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--white); }
.project img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.project h2 { padding: 1rem; }
.project:hover { box-shadow: 0 3px 14px #29201622; }
.admin-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: clamp(1.4rem, 4vw, 3rem); padding-top: 2rem; }
.admin-sidebar form, .panel form { margin: 1rem 0 0; display: grid; gap: .8rem; }
.admin-sidebar form button, .panel form > button { justify-self: start; }
.gallery-list { display: grid; gap: .45rem; margin-top: 1.2rem; }
.gallery-list button { justify-content: space-between; align-items: start; text-align: left; font-size: .86rem; }
.gallery-list strong { overflow-wrap: anywhere; }
.gallery-list span, .hint { color: var(--muted); font-size: .82rem; }
.admin-title .intro, .admin-content > .intro { padding: .35rem 0 1.2rem; }
.admin-title h1, .admin-content h1 { font-size: clamp(2.15rem, 6vw, 3.8rem); }
.admin-content { display: grid; gap: 1.05rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.wide { grid-column: 1 / -1; }
.toggles { display: flex; flex-wrap: wrap; gap: .15rem 1rem; }
.toggles label { display: flex; align-items: center; gap: .42rem; min-height: 44px; }
.panel .actions, .panel > .hint, .credential { margin-top: .75rem; }
.credential { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .6rem; padding: .75rem; background: var(--wash); }
.pill { color: var(--muted); font-size: .81rem; }
.admin-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: .7rem; margin-top: .8rem; }
.admin-photos article { display: grid; gap: .25rem; min-width: 0; }
.admin-photos img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: 5px; }
.admin-photos button { font-size: .78rem; padding: .32rem .45rem; }
.admin-files li { padding: .2rem 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: .55rem; overflow-wrap: anywhere; }
@media (max-width: 920px) { .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
  .gallery-list { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
}
@media (max-width: 570px) {
  main { width: auto; margin: 0 1rem; }
  .masthead { min-height: 59px; }
  .gallery-head { display: grid; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery .row { align-items: start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
}

.save-featured { margin-top: 1rem; }

:root {
  color-scheme: dark;
  --paper: #171918;
  --white: #232624;
  --ink: #f1f3ed;
  --muted: #adb6ae;
  --line: #3b443e;
  --green: #b2d7bd;
  --wash: #33463b;
  --error: #983f35;
  font-family: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
h1, h2 { font-family: inherit; font-weight: 650; }
h1 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1.05; letter-spacing: -.045em; }
h2 { font-size: clamp(1.18rem, 2.5vw, 1.6rem); letter-spacing: -.025em; }
.masthead { min-height: 60px; }
main { width: min(94%, 1600px); }
.intro { padding: clamp(1.8rem, 5vw, 4.3rem) 0 clamp(1.35rem, 3vw, 2.5rem); }
.eyebrow { margin-bottom: .7rem; }
.primary { color: #17291e; font-weight: 750; }
.primary:hover { background: #c6e6ce; }
.status { color: #17291e; }
.status.error { color: #fff; }
input, textarea, select { border-color: var(--line); }
.gallery-head { align-items: center; }
.gallery-tools, .size-controls, .section-tabs, .photo-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: .45rem;
}
.gallery-tools { justify-content: end; }
.filters { margin: 0 0 .95rem; align-items: center; }
.filter-rating { display: flex; align-items: center; gap: .4rem; }
.filter-rating select { width: auto; }
#filtered-total, .section-tabs span { color: var(--muted); font-size: .82rem; }
.section-tabs { padding-bottom: 1.1rem; }
.section-tabs button { gap: .55rem; }
.photo-grid { align-items: start; gap: .9rem .7rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.photo-grid[data-density=small] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.photo-grid[data-density=large] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.photo-image, .photo-open { border-radius: 3px; background: #111411; }
.photo-open { min-height: 0; }
.photo-open img, .project img, .admin-photos img {
  width: 100%; height: auto; aspect-ratio: auto; object-fit: contain;
}
.admin-photos article { align-content: start; }
.photo-actions { gap: .18rem; }
.icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; min-height: 40px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--muted); }
.icon svg { width: 19px; height: 19px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.icon[aria-pressed=true] { color: #d9eddb; }
.icon[aria-pressed=true][data-favorite] svg, .icon[aria-pressed=true].flag svg { fill: currentColor; }
.rating-control { position: relative; display: inline-flex; align-items: center; min-height: 40px; }
.rating-control > span { position: absolute; pointer-events: none; inset-inline-start: .32rem; font-size: .78rem; color: #e4c778; }
.rating-control select { width: 3rem; min-height: 40px; font-size: .75rem; padding: .3rem .1rem .3rem 1.22rem; border-color: transparent; background: transparent; appearance: none; }
#photo-viewer button { color: var(--ink); }
#viewer-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; }
#comparison { width: min(96%, 1480px); max-width: none; max-height: 94dvh; }
.comparison-photos { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; margin-top: .7rem; }
.comparison-photos figure { margin: 0; min-width: 0; }
.comparison-image { display: grid; place-items: center; height: min(69dvh, 780px); background: #111411; overflow: auto; }
.comparison-image img { object-fit: contain; width: 100%; height: 100%; min-height: 0; }
#comparison[data-zoom=zoom] .comparison-image { display: block; }
#comparison[data-zoom=zoom] img { width: 200%; height: auto; max-width: none; }
.comparison-photos figcaption { color: var(--muted); font-size: .78rem; padding-top: .3rem; overflow-wrap: anywhere; }
.legacy-finder { display: flex; align-items: end; gap: .55rem; margin-bottom: 1.75rem; }
.legacy-finder label { flex: 1; max-width: 26rem; }
.photo-section { margin: 1.4rem 0 .55rem; color: var(--muted); font-size: 1rem; font-weight: 650; }
@media (max-width: 920px) {
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .photo-grid[data-density=small] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .photo-grid[data-density=large] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 570px) {
  main { width: auto; margin: 0 .65rem; }
  .gallery-tools { justify-content: start; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-grid[data-density=small] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .photo-grid[data-density=large] { grid-template-columns: minmax(0, 1fr); }
  .comparison-image { height: 48dvh; }
  .photo-actions { gap: 0; }
  .photo-actions .icon { width: 34px; min-height: 38px; }
}
.archive-downloads { margin-bottom: 1rem; }
.show-more { display: flex; justify-content: center; padding: 1rem 0 2rem; }
img[data-protected-preview] { -webkit-touch-callout: none; user-select: none; }

/* Retain the original crop while independently filling each column. */
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
}
main:has(#photos), main:has(> .photo-grid) { width: min(97%, 1700px); margin-inline: auto; }
.photo-grid.photo-masonry { display: block; position: relative; }
.photo-grid.photo-masonry > .photo { position: absolute; }
.photo-grid .photo { flex: none; max-width: 100%; }
.photo-grid .photo-open { aspect-ratio: var(--image-ratio, 1.5); }
.photo-grid .photo-open img { width: 100%; height: 100%; object-fit: contain; }
.photo-grid .photo-open .waiting-for-photo { opacity: 0; }
.photo-grid .photo-open:has(.waiting-for-photo) {
  background: linear-gradient(135deg, #1e2420, #2b312c);
}
.photo-image .photo-actions {
  position: absolute;
  inset: auto 0 0;
  justify-content: flex-start;
  padding: .45rem .35rem .25rem;
  background: linear-gradient(transparent, #111714ee);
  color: #f1f3ed;
  opacity: 0;
  pointer-events: none;
}
.photo-image .photo-actions .icon,
.photo-image .photo-actions .rating-control select { color: inherit; }
.photo-image .photo-actions .icon[aria-pressed=true] { background: var(--wash); }
.photo.is-compared .photo-image { outline: 3px solid #58dc85; outline-offset: -3px; }
.photo.is-compared [data-compare][aria-pressed=true] { color: #78f6a0; }
.photo:has(:focus-visible) .photo-actions,
.photo.is-touch-active .photo-actions { opacity: 1; pointer-events: auto; }
@media (hover: hover) and (pointer: fine) {
  .photo:hover .photo-actions { opacity: 1; pointer-events: auto; }
}
@media (max-width: 570px) {
  .photo-grid { gap: 4px; }
  .photo-image .photo-actions { padding-inline: .15rem; }
  .photo-image .photo-actions .icon { min-width: 34px; min-height: 38px; }
}

.selection-guide {
  margin-bottom: .9rem; padding: .65rem .9rem; border: 1px solid var(--line);
  border-radius: 6px; background: var(--white);
}
.selection-guide summary { cursor: pointer; font-weight: 700; }
.selection-guide ol { margin: .5rem 0; padding-inline-start: 1.4rem; }
.selection-guide li + li { margin-top: .24rem; }
.family-workspace {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(174px, 206px);
  grid-template-areas: 'material tools'; align-items: start; gap: .7rem;
}
.family-material { grid-area: material; min-width: 0; }
.family-tools {
  grid-area: tools; position: sticky; top: .45rem; z-index: 3; display: grid; gap: .55rem;
  padding: .6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--white);
}
.family-tools :is(.filters, .size-controls) { margin: 0; gap: .25rem; }
.family-tools button, .family-tools .button { padding: .35rem .5rem; min-height: 40px; font-size: .82rem; }
.family-tools .size-controls button { flex: 1; }
.family-tools .filter-rating { width: 100%; }
.family-tools .filter-rating select { min-height: 40px; }
.family-tools #filtered-total { font-variant-numeric: tabular-nums; }
.selection-tools { display: grid; gap: .4rem; font-size: .83rem; }
.mail-compose { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.mail-compose label { margin-block: .4rem; }
.mail-preview { min-width: 0; }
.mail-preview-content { background: #fbfaf6; color: #202521; margin-top: .5rem; border-radius: 6px; overflow: hidden; }
.mail-preview-content img { width: 100%; max-height: 360px; object-fit: contain; background: #ece9e0; }
.mail-preview-content > div { padding: .9rem; }
.mail-preview-content > div > strong { letter-spacing: .12em; }
.mail-preview-content p { white-space: pre-wrap; overflow-wrap: anywhere; padding-top: .65rem; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 25; }
.confetti span { position: absolute; top: 0; width: 8px; height: 13px; border-radius: 2px; }
.family-tools [hidden], .mail-panel [hidden] { display: none; }
@media (max-width: 780px) {
  .family-workspace { grid-template: 'tools' auto 'material' auto / minmax(0, 1fr); }
  .family-tools { top: 0; gap: .35rem; }
  .family-tools .filter-rating { width: auto; }
  .family-tools .size-controls { justify-content: start; }
  .family-tools .size-controls button { flex: none; }
  .selection-tools { display: flex; align-items: center; justify-content: space-between; }
  .mail-compose { grid-template-columns: 1fr; gap: .75rem; }
}
.gift-recommendation {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem;
  margin: 0 0 .7rem; padding: .68rem .8rem; border: 1px solid var(--line); border-radius: 6px;
}
.gift-recommendation h3 { margin: 0; font-size: .95rem; }
.gift-recommendation p { margin-top: .2rem; color: var(--muted); font-size: .84rem; }
