:root {
  color-scheme: dark;
  --wall: #40161f;
  --ink: #f7e6cb;
  --gold: #efc783;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, sans-serif;
  background: #351018;
  color: var(--ink);
  font-family: var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 50% 40%, #7738449c, transparent 67%),
    repeating-linear-gradient(90deg, #0000000d 0 1px, #ffffff06 1px 2px, transparent 2px 6px),
    var(--wall);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 2px solid #fff1bd; outline-offset: 6px; }
.view { padding: clamp(1.65rem, 4.2vw, 3.05rem) 1rem 2.8rem; text-align: center; }
h1 { margin: 0; font: 400 clamp(2.65rem, 7vw, 5rem)/.97 var(--serif); letter-spacing: -.075em; text-wrap: balance; }
h1 em { font-weight: inherit; color: var(--gold); }
.date {
  display: block;
  margin-top: 1.1rem;
  font-size: .875rem;
  color: var(--ink);
  letter-spacing: .13em;
  text-transform: uppercase;
}
.portrait {
  position: relative;
  isolation: isolate;
  width: min(81vw, clamp(285px, 41svh, 420px));
  aspect-ratio: var(--frame-ratio, 4 / 5);
  margin: 1.38rem auto 1.48rem;
}
.portrait::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: url('/frame.png') center / 100% 100% no-repeat;
  filter: drop-shadow(0 13px 15px #200409b3);
}
.opening {
  position: absolute;
  z-index: 0;
  inset: 13.6% 17.1% 14.3%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #291c1a;
}
.opening::before {
  content: '';
  position: absolute;
  inset: -14px;
  background: var(--photo-background, none) center / cover no-repeat;
  filter: blur(12px) brightness(.53);
}
.opening img, .archive-photo img { display: block; width: 100%; height: 100%; }
.opening img { position: absolute; inset: 0; object-fit: contain; }
.archive-photo img { object-fit: cover; }
.photo-message { position: relative; padding: 1rem; font: 1.12rem/1.45 var(--serif); color: var(--ink); }
.album-link {
  display: inline-flex;
  align-items: center;
  padding: .73rem 1.18rem;
  margin-inline: auto;
  border: 1px solid #c99357;
  background: #3d121c;
  box-shadow: inset 0 0 0 3px #3d121c, inset 0 0 0 4px #a874473c;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
}
.album-link:hover { background: #59212b; }
.archive h1 { font-size: clamp(2.55rem, 6vw, 4.45rem); margin-inline: auto; max-width: 24ch; line-height: 1.02; }
.archive-note { margin: 2.2rem auto; max-width: 37ch; color: var(--ink); line-height: 1.55; text-wrap: pretty; }
.archive-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.archive-actions .album-link { margin-inline: 0; }
.archive-grid {
  max-width: 68rem;
  margin: 2.1rem auto 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  justify-content: center;
  gap: clamp(.85rem, 2vw, 1.65rem);
}
.archive-grid:empty { margin: 0; }
.archive-card { display: grid; justify-self: center; width: min(100%, 14.5rem); gap: .7rem; font-size: .91rem; }
.archive-photo {
  aspect-ratio: 4 / 5;
  border: 4px double #d6a86a;
  box-shadow: 0 5px 16px #2509129c;
  background: #2e1018;
  overflow: hidden;
}
.archive-card:hover .archive-photo { border-color: #ffda94; }
.archive-card:hover time { text-decoration: underline; text-underline-offset: .3em; }
@media (max-width: 410px) {
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
