/* Literary layout for A Diary Without A Body. */

.diary-body {
  --diary-sound-slot-width: 10ch;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #000;
}

.diary-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image: url("../../img/footprints/diary-bg.png");
  background-size: cover;
  background-position: center 12%;
  background-repeat: no-repeat;
  filter: saturate(0.72) contrast(0.88);
}

.diary-body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(120% 100% at 50% 20%, rgba(0, 0, 0, 0.24) 0%, rgba(0, 0, 0, 0.62) 58%, rgba(0, 0, 0, 0.84) 100%),
    rgba(0, 0, 0, 0.56);
}

.diary-body header {
  background: linear-gradient(
    to bottom,
    rgba(5, 9, 14, 0.82) 0%,
    rgba(5, 9, 14, 0.46) 68%,
    rgba(5, 9, 14, 0) 100%
  );
}

.diary-stage {
  width: min(100%, 72ch);
  margin: 0;
  padding: clamp(2.3rem, 7vh, 5.8rem) clamp(1rem, 6vw, 3rem) 2.2rem;
}

.diary-intro {
  margin: 0 0 clamp(1.8rem, 4vh, 2.6rem);
}

.diary-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 600;
  letter-spacing: 0.015em;
  opacity: 0.94;
}

.diary-lead {
  margin: 0;
  max-width: 64ch;
  opacity: 0.76;
  line-height: 1.56;
}

.diary-day {
  margin: 0 0 clamp(1.9rem, 4.3vh, 2.8rem);
  max-width: 58ch;
}

.diary-day-title {
  margin: 0 0 0.9rem;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.23em;
  text-transform: uppercase;
  opacity: 0.72;
}

.diary-entry {
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.diary-entry-meta {
  display: inline-grid;
  grid-template-columns: max-content var(--diary-sound-slot-width);
  align-items: baseline;
  column-gap: 0.4rem;
  margin: 0 0 0.35rem;
}

.diary-contributor {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  opacity: 0.94;
}

.diary-new-indicator {
  display: block;
  grid-column: 1 / -1;
  font-size: 0.66rem;
  font-weight: 560;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
  white-space: nowrap;
  margin: 0 0 0.22rem 0;
}

.diary-sound-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0;
  opacity: 0.5;
  margin-left: 0;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.diary-sound-placeholder {
  width: 100%;
  min-height: 1em;
  opacity: 0;
  pointer-events: none;
}

.diary-sound-btn:hover {
  opacity: 0.76;
}

.diary-sound-btn[aria-pressed="true"] {
  opacity: 0.82;
}

.diary-sound-btn:focus-visible {
  opacity: 0.86;
  outline: 1px solid rgba(255, 255, 255, 0.68);
  outline-offset: 3px;
}

.diary-text {
  margin: 0;
  max-width: 58ch;
  line-height: 1.7;
  opacity: 0.9;
}

.diary-text + .diary-text {
  margin-top: 0.72rem;
}

.diary-body #site-footer {
  margin-top: 1.6rem;
}

/* Back link to overview */
.detail-back-nav {
  max-width: 52ch;
  margin: clamp(0.3rem, 1.1vh, 0.65rem) 0 0 0;
  padding: 0;
  text-align: left;
}

.detail-back-link {
  color: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.detail-back-link:hover {
  opacity: 0.72;
  text-decoration: none;
}

.detail-back-link:focus-visible {
  opacity: 0.82;
  outline: 1px solid rgba(255, 255, 255, 0.75);
  outline-offset: 3px;
  text-decoration: none;
}

@media (max-width: 640px) {
  .diary-stage {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
