.viewer {
  max-height: calc(100vh - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.viewer img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(68vh, 720px);
  object-fit: contain;
  flex: 0 1 auto;
  margin: 0 auto;
}

.viewer p {
  margin: 0;
  max-height: 22vh;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
  line-height: 1.65;
}

.viewer-time {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 12px;
}

.viewer .btn {
  align-self: center;
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .modal-mask {
    padding: 10px;
  }

  .viewer {
    max-height: calc(100vh - 20px);
    padding: 12px;
  }

  .viewer img {
    max-height: 58vh;
  }

  .viewer p {
    max-height: 26vh;
  }
}
