* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #dce0d8;
  color: #354235;
  font-family: Arial, sans-serif;
}
main {
  max-width: 1100px;
  margin: auto;
  padding: 30px 55px 40px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid #bec7b9;
}
header > span {
  font: 10px monospace;
  color: #707d6e;
}
.brand {
  color: inherit;
  text-decoration: none;
  font:
    italic 29px Georgia,
    serif;
  letter-spacing: -1px;
}
.intro {
  margin: 39px auto 25px;
  max-width: 820px;
}
.eyebrow {
  font: 9px monospace;
  letter-spacing: 2px;
  color: #707d6e;
}
h1 {
  font:
    normal 43px/1.15 Georgia,
    serif;
  letter-spacing: -1px;
  margin: 15px 0 10px;
}
.intro > p:last-child {
  color: #707d6e;
  font-size: 12px;
  line-height: 1.8;
}
.album {
  max-width: 820px;
  margin: auto;
  background: #fffefa;
  padding: 20px 20px 0;
  box-shadow: 0 14px 35px #26352816;
  transform: rotate(0.45deg);
}
#mosaic {
  display: grid;
  background: #c2c9be;
  aspect-ratio: 1.5;
}
.tile {
  border: 0;
  background-color: transparent;
  padding: 0;
  min-width: 0;
  aspect-ratio: 1;
  cursor: pointer;
  position: relative;
}
.tile:after {
  content: "";
  position: absolute;
  inset: 0;
  background: #13210c;
  opacity: 0.16;
  transition: opacity 160ms;
}
.tile:hover:after,
.tile:focus-visible:after {
  opacity: 0;
}
.tile:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -3px;
  z-index: 1;
}
.caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 0;
  font: 9px monospace;
  color: #778070;
}
footer {
  max-width: 820px;
  margin: 32px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
#dedication {
  font: italic 16px Georgia;
}
.number {
  font: 9px monospace;
  color: #7e8878;
}
#demo {
  font: 9px monospace;
  color: #7e8878;
  text-align: center;
  margin: 30px 0 0;
}
#status {
  font-size: 13px;
  text-align: center;
  color: #6b7466;
}
dialog {
  border: 0;
  background: #fffefa;
  color: #354235;
  padding: 0;
  max-width: 1000px;
  width: 90vw;
  max-height: 90dvh;
  box-shadow: 0 25px 100px #0005;
}
dialog::backdrop {
  background: #172018c9;
  backdrop-filter: blur(5px);
}
.detail {
  display: block;
}
.photo {
  background: #e9ece4;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  padding: 24px;
  position: relative;
}
.photo img {
  width: 100%;
  height: 75dvh;
  object-fit: contain;
  max-height: 780px;
}
#close {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  background: #fffefa;
  border: 1px solid #d7dbcf;
  border-radius: 50%;
  font-size: 23px;
  color: #56614e;
  cursor: pointer;
}
.photo #image-error {
  position: absolute;
  font-size: 12px;
}
.modal-open {
  overflow: hidden;
}
@media (max-width: 600px) {
  main {
    padding: 22px 22px 32px;
  }
  header > span {
    font-size: 8px;
  }
  header {
    padding-bottom: 20px;
  }
  .intro {
    margin-top: 30px;
  }
  h1 {
    font-size: 34px;
  }
  .album {
    padding: 10px 10px 0;
    transform: none;
  }
  .caption {
    font-size: 8px;
    padding: 14px 0;
  }
  .number {
    display: none;
  }
  .photo {
    padding: 15px;
    min-height: 200px;
  }
  .photo img {
    height: 40dvh;
  }
  footer {
    margin-top: 25px;
  }
  dialog {
    width: 94vw;
    max-height: 92dvh;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
