.post-layout {
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.post-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 0 1 50ch;
  min-width: 0;
  min-height: var(--view-height);
}

.post-note {
  margin: 0;
  margin-top: auto;
  align-self: flex-end;
  font-size: 0.85em;
  font-weight: 400;
  line-height: 1.5;
  color: inherit;
  opacity: 0.75;
  white-space: pre-line;
  flex-grow: 1;
  align-content: flex-end;
  padding-bottom: 1em;
}

.post-aside {
  flex: 1 0 50%;
  min-width: 50%;
}

.post-carousel {
  position: sticky;
  top: calc(var(--header-offset) + 1rem);
  height: var(--view-height);
  flex-grow: 1;
}

.post-carousel--has-nav::before,
.post-carousel--has-nav::after {
  position: absolute;
  z-index: 2;
  bottom: 0;
  height: var(--bar-height);
  display: flex;
  align-items: center;
  font-size: 2rem;
  pointer-events: none;
}

.post-carousel--has-nav::before {
  content: "←";
  left: 0.75rem;
}

.post-carousel--has-nav::after {
  content: "→";
  right: 0.75rem;
}

.post-carousel__track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100vw;
  height: 100%;
}

.post-carousel__track::-webkit-scrollbar {
  display: none;
}

.post-carousel__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 100vw;
  height: 100%;
}

.post-carousel__image {
  width: 100%;
  max-width: 100vw;
  height: calc(100% - 2 * var(--bar-height));
  margin: var(--bar-height) auto;
  object-fit: contain;
}

.post-carousel__video {
  width: 100%;
  max-width: 100vw;
  height: calc(100% - 2 * var(--bar-height));
  margin: var(--bar-height) auto;
  object-fit: contain;
}

.post-carousel__nav {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  width: 50%;
  border: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 1;
  padding-bottom: 0;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.post-carousel__nav--prev {
  left: 0;
  justify-content: flex-start;
  padding-left: 0;
}

.post-carousel__nav--next {
  right: 0;
  justify-content: flex-end;
  padding-right: 0;
}

.post-carousel__nav:focus-visible {
  outline: 2px solid #222;
  outline-offset: 2px;
}
