.dream-card {
  grid-column: 3 / span 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 146px;
  margin-top: 18px;
  padding: 2px 0;
}

.dream-card__title-editor,
.dream-card__sub-editor {
  position: relative;
}

.dream-card__title-display,
.dream-card__title-input,
.dream-card__sub-display,
.dream-card__sub-input {
  display: block;
  width: 100%;
  height: 28px;
  padding: 0 8px;
  border-radius: 14px;
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 400;
  text-align: center;
  line-height: 28px;
}

.dream-card__title-display,
.dream-card__sub-display {
  border: 0;
  background: transparent;
  color: #4c3d3d;
  cursor: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dream-card__title-input,
.dream-card__sub-input {
  display: none;
  height: 28px;
  border: 0;
  background: transparent;
  color: #4c3d3d;
  outline: none;
}

.dream-card__title-editor--editing .dream-card__title-display,
.dream-card__sub-editor--editing .dream-card__sub-display {
  display: none;
}

.dream-card__title-editor--editing .dream-card__title-input,
.dream-card__sub-editor--editing .dream-card__sub-input {
  display: block;
}

.dream-card__title-editor {
  margin-bottom: 2px;
}

.dream-card__sub-editor {
  margin-top: -6px;
}

.dream-card__bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0;
}

.dream-card__bubble--left-avatar {
  margin-bottom: 4px;
}

.dream-card__bubble--right-avatar {
  justify-content: space-between;
  margin-bottom: 2px;
}

.dream-card__avatar-button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
}

.dream-card__avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #f2dfe0;
}

.dream-card__bubble-editor {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.dream-card__bubble-display,
.dream-card__bubble-input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border-radius: 15px;
  box-sizing: border-box;
  font-size: 12px;
  line-height: 30px;
}

.dream-card__bubble-display {
  display: block;
  border: 0;
  background: transparent;
  color: #4c3d3d;
  cursor: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dream-card__bubble-input {
  display: none;
  border: 0;
  background: transparent;
  color: #4c3d3d;
  outline: none;
}

.dream-card__bubble-editor--editing .dream-card__bubble-display {
  display: none;
}

.dream-card__bubble-editor--editing .dream-card__bubble-input {
  display: block;
}

.dream-card__title-input::placeholder,
.dream-card__sub-input::placeholder,
.dream-card__bubble-input::placeholder {
  color: rgba(76, 61, 61, 0.45);
}

@media (max-width: 420px) {
  .dream-card {
    gap: 0;
    min-height: 136px;
    margin-top: 14px;
    padding: 2px 0;
  }

  .dream-card__title-display,
  .dream-card__title-input,
  .dream-card__sub-display,
  .dream-card__sub-input {
    height: 26px;
    min-height: 26px;
    font-size: 11px;
    line-height: 26px;
  }

  .dream-card__bubble {
    min-height: 38px;
    gap: 8px;
    padding: 0;
  }

  .dream-card__bubble--left-avatar {
    margin-bottom: 3px;
  }

  .dream-card__bubble--right-avatar {
    margin-bottom: 1px;
  }

  .dream-card__avatar-button {
    width: 34px;
    height: 34px;
  }

  .dream-card__bubble-editor {
    padding: 4px 8px;
  }

  .dream-card__bubble-display,
  .dream-card__bubble-input {
    height: 28px;
    padding: 0 7px;
    font-size: 11px;
    line-height: 28px;
  }

  .dream-card__bubble-display {
    display: block;
  }

  .dream-card__bubble-input {
    display: none;
  }

  .dream-card__bubble-editor--editing .dream-card__bubble-input {
    display: block;
  }

  .dream-card__sub-editor {
    margin-top: -6px;
  }
}
