@font-face {
  font-family: Inter;
  src: url("./assets/fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

.gallery-board-target {
  position: absolute;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.gallery-board-target:focus-visible { outline: 2px solid #f8fafc; outline-offset: 2px; }

.life-gallery {
  width: min(1080px, calc(100% - 36px));
  max-width: none;
  max-height: calc(100dvh - 36px);
  padding: 0;
  border: 3px solid #64717d;
  border-radius: 9px;
  background: #17222c;
  color: #f7f8f6;
  box-shadow: 0 16px 56px #07101bbb;
}

.life-gallery::backdrop { background: #080d1657; }

.life-gallery-frame {
  display: grid;
  max-height: calc(100dvh - 42px);
  grid-template-rows: auto minmax(0, 1fr);
}

.life-gallery-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px clamp(13px, 2.5vw, 24px);
  border-bottom: 1px solid #8a9aa748;
  background: #1a3857;
}

.life-gallery-rail h2 {
  margin: 0;
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 700;
}

.life-gallery-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(10px, 1.7vw, 18px);
}

.life-gallery-section {
  min-width: 0;
  padding: 6px;
  border: 1px solid #6d7c88;
  border-radius: 5px;
  background: #101822;
}

.life-photo-gallery .life-gallery-rail { justify-content: flex-end; }

.life-photo-accordion {
  display: flex;
  gap: 5px;
  height: clamp(248px, 46vh, 420px);
}

.life-photo-panel {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid #8ea4b251;
  border-radius: 4px;
  background: #0b131d;
  color: #f7f8f6;
  cursor: pointer;
  transition: flex-grow .46s cubic-bezier(.22, .65, .26, 1), border-color .25s ease;
}

.life-photo-panel[aria-pressed="true"] {
  flex-grow: 5.25;
  border-color: #aabdcf;
}

.life-photo-panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  filter: saturate(.6) brightness(.72);
  transition: transform .46s cubic-bezier(.22, .65, .26, 1), filter .28s ease;
}

.life-photo-panel[aria-pressed="true"] img {
  object-fit: contain;
  transform: scale(1);
  filter: none;
}

.life-photo-caption {
  display: none;
  padding: 8px 10px;
  border-top: 1px solid #8ea4b251;
  background: #172534;
  text-align: left;
  font-size: clamp(12px, 1.25vw, 14px);
  font-weight: 600;
  line-height: 1.3;
}

.life-photo-panel[aria-pressed="true"] .life-photo-caption { display: block; }

.life-photo-panel:focus-visible { outline-offset: -3px; }

.places-gallery .life-gallery-rail { background: #233c77; }
.places-gallery { font-family: Inter, Arial, sans-serif; }

.bio-gallery { width: min(670px, calc(100% - 26px)); }
.bio-gallery .life-gallery-rail { background: #233c77; }

.bio-content {
  background: #e7e7e0;
  color: #1c2834;
  font-weight: 700;
}

.bio-facts {
  margin: 0;
  padding: 10px 12px 10px 30px;
  font-size: clamp(15px, 2vw, 19px);
  line-height: 1.55;
}

.bio-facts > li + li { margin-top: 7px; }
.bio-facts a { color: #183b77; text-underline-offset: .16em; }

.places-content.about-board-copy {
  background: #fff;
  padding: clamp(20px, 4vw, 35px);
  font-size: clamp(15px, 1.9vw, 18px);
  line-height: 1.55;
}

.about-board-copy p { margin: 0; }
.about-board-copy p + p { margin-top: .9em; }

.places-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  column-gap: 12px;
}

.places-content,
.places-viewer {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(10px, 1.7vw, 18px);
}

.places-content { scrollbar-gutter: stable; }

.places-masonry {
  position: relative;
  overflow: clip;
}

.places-tile {
  position: absolute;
  overflow: hidden;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: #101923;
  cursor: pointer;
  transition: top .34s ease, left .34s ease, width .34s ease, height .34s ease;
}

.places-gallery[open] .places-tile {
  animation: places-enter 500ms cubic-bezier(.19, 1, .22, 1) calc(var(--tile-index) * 21ms) both;
}

.places-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.places-tile:hover img, .places-tile:focus-visible img { transform: scale(1.045); }
.places-tile:focus-visible { outline-offset: -3px; }

.places-tile-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 24px 10px 9px;
  background: linear-gradient(transparent, #09121cf5 28%);
  color: #fff;
  font: 600 clamp(11px, 1.1vw, 13px)/1.4 Inter, Arial, sans-serif;
  text-align: left;
  opacity: 0;
  transition: opacity .2s ease;
}

.places-tile:is(:hover, :focus-visible) .places-tile-caption { opacity: 1; }

.places-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 40px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid #ffffffbd;
  border-radius: 50%;
  background: #101923c7;
}

.places-play::after {
  content: "";
  margin-left: 3px;
  border: 7px solid transparent;
  border-left: 11px solid #fff;
  border-right: 0;
}

.places-viewer-body { display: grid; place-items: center; }

.places-viewer-body img,
.places-viewer-body video {
  display: block;
  max-width: 100%;
  max-height: min(75dvh, 720px);
  border-radius: 5px;
  object-fit: contain;
}

.places-caption { max-width: 44rem; margin: 14px auto 0; line-height: 1.55; text-align: center; }

@keyframes places-enter {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 660px) {
  .life-gallery { width: calc(100% - 16px); max-height: calc(100dvh - 22px); }
  .life-gallery-frame { max-height: calc(100dvh - 28px); }
  .life-gallery-content { grid-template-columns: minmax(0, 1fr); }
  .life-photo-accordion { height: clamp(210px, 37vh, 320px); }
  [data-life-gallery="friends"] .life-photo-accordion { height: clamp(164px, 27vh, 250px); }
  .places-actions .poster-reader-close { min-height: 33px; padding: 0; }
}
