.memos-page {
  padding: 0.5rem 0 1rem;
  min-width: 0;
}

.memos-loading,
.memos-empty,
.memos-error {
  color: var(--font-color);
  opacity: 0.7;
  text-align: center;
  padding: 2.5rem 0;
  line-height: 1.8;
}

.memos-loading i {
  margin-right: 0.35rem;
  color: var(--theme-color);
}

.memos-feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.memos-item {
  padding: 1.25rem 1.35rem;
  border-radius: 12px;
  border: 1px solid var(--hr-border);
  background: var(--card-bg);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.memos-item:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.memos-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.85rem;
  min-width: 0;
}

.memos-time {
  font-size: 0.85rem;
  color: var(--font-color);
  opacity: 0.55;
  line-height: 1.3;
}

.memos-content {
  padding-left: 0;
  min-width: 0;
}

.memos-body {
  color: var(--font-color);
  line-height: 1.85;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 1rem;
  min-width: 0;
}

.memos-body p {
  margin: 0.5rem 0;
}

.memos-body p:first-child {
  margin-top: 0;
}

.memos-body p:last-child {
  margin-bottom: 0;
}

.memos-body a {
  color: var(--theme-color);
}

.memos-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.memos-body blockquote {
  margin: 0.75rem 0;
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--theme-color);
  background: var(--blockquote-bg);
  opacity: 0.95;
}

.memos-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
  gap: 0.5rem;
  margin: 0 0 0.85rem;
  min-width: 0;
}

.memos-photos + .memos-body {
  margin-top: 0;
}

.memos-photos--single {
  grid-template-columns: minmax(0, 420px);
}

.memos-photo {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: var(--hr-border);
  min-width: 0;
}

.memos-photo img {
  width: 100%;
  display: block;
  transition: transform 0.25s ease;
}

.memos-photos:not(.memos-photos--single) .memos-photo img {
  height: 140px;
  object-fit: cover;
}

.memos-photos--single .memos-photo img {
  max-height: min(480px, 70vh);
  object-fit: contain;
}

.memos-photo:hover img {
  transform: scale(1.02);
}

.memos-comments {
  margin-top: 1.15rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--hr-border);
  min-width: 0;
}

.memos-comments .comment-head {
  margin-bottom: 0.75rem;
}

.memos-comments .comment-headline {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--font-color);
}

.memos-comments .comment-headline i {
  color: var(--theme-color);
  margin-right: 0.35rem;
}

.memos-comments .comment-wrap {
  padding: 0;
}

.memos-comments .twikoo-memo-wrap {
  min-height: 0;
}

@media (max-width: 768px) {
  .memos-item {
    padding: 1rem;
  }

  .memos-photos:not(.memos-photos--single) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .memos-photos--single {
    grid-template-columns: minmax(0, 1fr);
  }

  .memos-photos:not(.memos-photos--single) .memos-photo img {
    height: 120px;
  }
}

@media (max-width: 420px) {
  .memos-item {
    padding: 0.85rem;
  }

  .memos-photos:not(.memos-photos--single) {
    grid-template-columns: minmax(0, 1fr);
  }

  .memos-photos:not(.memos-photos--single) .memos-photo img {
    height: auto;
    max-height: 240px;
    object-fit: cover;
  }

  .memos-body {
    font-size: 0.95rem;
  }
}
