.day-stream-item article > p:empty {
  display: none;
}

.stream-image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 12px;
  margin-top: 18px;
}

.stream-image-gallery img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 720px;
  border: 1px solid rgba(17, 17, 17, 0.46);
  background: #fffdf5;
  object-fit: contain;
}

.month-grid .day-tile.has-public-stream:not(.is-filled)::after {
  position: absolute;
  right: 5px;
  bottom: 4px;
  content: attr(data-stream-count) " 条";
  color: rgba(17, 17, 17, 0.58);
  font-size: 0.45rem;
  font-weight: 800;
}

/* A compact month index that shares the title's visible bottom edge. */

.month-journal .month-sheet-heading:has(.month-index) {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 33%);
  align-items: end;
  column-gap: 32px;
}

.month-journal .month-sheet-heading:has(.month-index) .month-title-copy {
  display: block;
  width: auto;
}

.month-journal .month-sheet-heading:has(.month-index) .month-title-copy h1 {
  margin: 0;
}

.month-index {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  width: 100%;
  height: 20px;
  box-sizing: border-box;
  color: rgba(17, 17, 17, 0.18);
  background: transparent;
  transform: translateY(-2px);
}

.month-index-track {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
}

.month-index-month {
  position: relative;
  display: grid;
  place-items: center;
  height: 18px;
  border-radius: 1px;
  color: rgba(17, 17, 17, 0.12);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.36rem;
  font-weight: 450;
  line-height: 1;
  text-decoration: none;
}

.month-index-month::after {
  display: none;
  content: none;
}

.month-index-label {
  position: relative;
  z-index: 1;
}

.month-index-month.is-available {
  color: rgba(17, 17, 17, 0.46);
}

.month-index-month.is-current {
  color: rgba(17, 17, 17, 0.72);
}

.month-index-month.is-available:hover,
.month-index-month.is-available:focus-visible,
.month-index-month.is-current:hover,
.month-index-month.is-current:focus-visible {
  color: #111;
  outline: 0;
}

.month-index-canister {
  position: relative;
  display: grid;
  place-items: center;
  width: 18px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 2px;
  color: rgba(17, 17, 17, 0.72);
  background: rgba(255, 212, 0, 0.54);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.28rem;
  font-weight: 620;
  line-height: 1;
  transform-origin: 50% 50%;
  transition: transform 140ms ease, filter 140ms ease;
}

.month-index-canister::before {
  position: absolute;
  top: -2px;
  right: -1px;
  left: -1px;
  height: 4px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.68);
  box-shadow: 0 19px 0 rgba(17, 17, 17, 0.68);
  content: "";
}

.month-index-canister::after {
  position: absolute;
  top: -5px;
  left: 6px;
  width: 6px;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: rgba(17, 17, 17, 0.68);
  content: "";
}

.month-index-canister > span {
  position: relative;
  z-index: 1;
}

.month-index-month:hover .month-index-canister,
.month-index-month:focus-visible .month-index-canister {
  filter: saturate(1.08);
  transform: scale(1.05);
}

@media (max-width: 760px) {
  .month-journal .month-sheet-heading:has(.month-index) {
    display: block;
    padding-bottom: 27px;
  }

  .month-journal .month-sheet-heading:has(.month-index) .month-title-copy {
    display: block;
  }

  .month-index {
    position: absolute;
    right: 3px;
    bottom: 5px;
    width: min(244px, 68%);
    height: 16px;
    padding: 0 5px;
    transform: none;
  }

  .month-index-month {
    height: 14px;
    font-size: 0.2rem;
  }

  .month-index-canister {
    transform: scale(0.82);
  }

  .month-index-month:hover .month-index-canister,
  .month-index-month:focus-visible .month-index-canister {
    transform: scale(0.88);
  }
}
