html.moments-route .header-inner {
  height: 0.01vh !important;
  max-height: none;
}

html.moments-route #banner {
  visibility: hidden;
}

html.moments-route .navbar {
  background-color: var(--navbar-bg-color);
}

html.moments-route main {
  padding-top: 5.25rem;
}

html.moments-route #board {
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.moments-page {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: clamp(2.75rem, 6vw, 4.75rem) clamp(0.25rem, 2vw, 1rem);
  color: var(--post-text-color);
}

.moments-page__header {
  margin-bottom: clamp(3.25rem, 7vw, 5.25rem);
}

.moments-page__title {
  margin: 0;
  color: var(--post-heading-color);
  font-size: clamp(1.8rem, 4vw, 2.35rem);
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

.moments-page__title::after {
  display: block;
  width: 2.6rem;
  height: 2px;
  margin-top: 1rem;
  background: var(--link-hover-color);
  content: "";
  opacity: 0.72;
}

.moments-page__description,
.moments-page__empty {
  margin: 1.1rem 0 0;
  color: var(--sec-text-color);
  font-size: 0.92rem;
  line-height: 1.7;
}

.moments-page__empty {
  margin: 5rem 0 4rem;
  text-align: center;
}

.moments-page__back {
  margin-bottom: clamp(2.5rem, 6vw, 4.25rem);
}

.moments-page__back a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--sec-text-color);
  font-size: 0.9rem;
  line-height: 1.4;
  transition: color 0.2s ease, transform 0.2s ease;
}

.moments-page__back a:hover {
  color: var(--link-hover-color);
  transform: translateX(-2px);
}

.moment-item {
  position: relative;
  animation: moment-reveal 0.45s ease both;
  animation-delay: calc(var(--moment-order, 0) * 45ms);
}

.moment-item--timeline {
  padding-bottom: clamp(3.5rem, 8vw, 5.75rem);
}

.moment-item--timeline + .moment-item--timeline {
  padding-top: clamp(3.5rem, 8vw, 5.75rem);
}

.moment-item--timeline:not(:last-child)::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-color) 12%, var(--line-color) 88%, transparent);
  content: "";
}

.moment-item__meta {
  margin-bottom: 1.15rem;
  line-height: 1;
}

.moment-item__permalink {
  display: inline-block;
  color: var(--sec-text-color);
  font-family: var(--font-monospace, "Maple Mono NF CN", "JetBrains Mono", monospace);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.035em;
  opacity: 0.82;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.moment-item__permalink:hover,
.moment-item__permalink:focus-visible {
  color: var(--link-hover-color);
  opacity: 1;
}

.moment-content.markdown-body {
  color: var(--post-text-color);
  font-size: 1rem;
  line-height: 1.82;
}

.moment-content.markdown-body > :first-child {
  margin-top: 0;
}

.moment-content.markdown-body > :last-child {
  margin-bottom: 0;
}

.moment-content.markdown-body p,
.moment-content.markdown-body ul,
.moment-content.markdown-body ol,
.moment-content.markdown-body blockquote,
.moment-content.markdown-body pre,
.moment-content.markdown-body figure.highlight {
  margin-top: 0.85rem;
  margin-bottom: 0.85rem;
}

.moment-content.markdown-body h1,
.moment-content.markdown-body h2,
.moment-content.markdown-body h3,
.moment-content.markdown-body h4,
.moment-content.markdown-body h5,
.moment-content.markdown-body h6 {
  margin-top: 1.4em;
  margin-bottom: 0.55em;
  color: var(--post-heading-color);
  font-size: 1.08rem;
  line-height: 1.45;
}

.moment-content.markdown-body blockquote {
  padding: 0.55rem 0 0.55rem 1rem;
  border-left: 2px solid var(--line-color);
  border-radius: 0;
  background: transparent;
  color: var(--sec-text-color);
}

.moment-content.markdown-body a {
  color: var(--post-link-color);
  text-decoration-color: color-mix(in srgb, var(--post-link-color) 35%, transparent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.moment-content.markdown-body .code-wrapper,
.moment-content.markdown-body figure.highlight,
.moment-content.markdown-body pre {
  max-width: 100%;
  overflow-x: auto;
}

.moment-images {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.45rem;
}

.moment-images--1 {
  grid-template-columns: minmax(0, 1fr);
}

.moment-images--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.moment-images--many {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.moment-image {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line-color) 78%, transparent);
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--board-bg-color) 88%, var(--line-color));
  line-height: 0;
}

.moment-images--2 .moment-image {
  aspect-ratio: 4 / 3;
}

.moment-images--many .moment-image {
  aspect-ratio: 1;
}

.moment-image img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform 0.28s ease, filter 0.2s ease-in-out;
}

.moment-images--1 .moment-image img {
  height: auto;
  max-height: 36rem;
  object-fit: contain;
}

.moment-image:hover img {
  transform: scale(1.01);
}

.moment-image:focus-visible {
  outline: 2px solid var(--link-hover-color);
  outline-offset: 3px;
}

.moment-giscus {
  margin-top: clamp(2rem, 5vw, 3.1rem);
  min-width: 0;
}

.moment-giscus__widget {
  display: block;
  width: 100%;
  min-width: 0;
}

.moment-giscus__widget::part(iframe) {
  display: block;
  width: 100%;
  max-width: 100%;
}

.moment-giscus__status,
.moment-giscus__noscript {
  margin: 1rem 0 0;
  color: var(--sec-text-color);
  font-size: 0.82rem;
  line-height: 1.6;
}

.moment-giscus.is-unavailable .moment-giscus__widget {
  display: none;
}

@keyframes moment-reveal {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767.98px) {
  html.moments-route main {
    padding-top: 4.75rem;
  }

  .moments-page {
    padding-right: 0;
    padding-left: 0;
  }

  .moment-images--many {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  .moment-images--2,
  .moment-images--many {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .moment-item {
    animation: none;
  }

  .moment-image img,
  .moments-page__back a,
  .moment-item__permalink {
    transition: none;
  }

  .moment-image:hover img,
  .moments-page__back a:hover {
    transform: none;
  }
}

@media print {
  html.moments-route main {
    padding-top: 0;
  }

  .moment-giscus,
  .moments-page__back {
    display: none;
  }
}
