.memo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.memo-grid[hidden] { display: none; }

.memo-grid > li {
  display: flex;
  flex: 0 0 285px;
}

.memo-card {
  position: relative;
  width: 285px;
  height: 285px;
  overflow: hidden;
  border-radius: 20px;
  color: var(--white00);
}

.memo-card-open-button {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 25px 34px 36px 21px;
  flex-direction: column;
  gap: 20px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.memo-card-open-button:focus-visible {
  outline: 3px solid var(--white00);
  outline-offset: -3px;
  border-radius: 20px;
}

.memo-card-header {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 12px;
  padding-right: 40px;
}

.memo-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  flex: 1;
  font-size: var(--font-size-heading-small);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-heading-small);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-button {
  position: absolute;
  top: 25px;
  right: 34px;
  z-index: 1;
  display: block;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0;
  background-color: var(--color-memo-star);
  -webkit-mask: url('../assets/icons/star.svg') center / contain no-repeat;
  mask: url('../assets/icons/star.svg') center / contain no-repeat;
  cursor: pointer;
}

.pin-button[aria-pressed='true'] { background-color: var(--color-point); }

.memo-content {
  display: -webkit-box;
  height: 141px;
  margin-top: 0;
  overflow: hidden;
  color: inherit;
  font-size: var(--font-size-body-small);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-body-small);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
}

.memo-card-footer {
  display: flex;
  margin-top: auto;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  color: var(--white00);
}

.memo-category,
.memo-date {
  font-size: var(--font-size-body-small);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-body-small);
}

.memo-date { text-align: right; }
.memo-card--daily { background-color: var(--color-memo-daily); }
.memo-card--daily .memo-card-footer { color: var(--Blue-blue01); }
.memo-card--work { background-color: var(--Blue-blue06); }
.memo-card--others { background-color: var(--Gray-gray02); }
